Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5b6f0fcba89379000c2328a4

Swap values inside brackets

Easy challenge.

Start file
#Everyday routine... :\ 

amazing_func("Some amazing text", 123, variable) # Kittens

def func():
	return 'Stuff for making movement harder'

def func2(m):
	v = 0
	for i in range(10):
		v += i*m
		print(v, i, m)

very_strange_func(42, foobar, 'Another text') # Dogs

test = func()
func2(len(test))
End file
#Everyday routine... :\ 

amazing_func(42, foobar, 'Another text') # Kittens

def func():
	return 'Stuff for making movement harder'

def func2(m):
	v = 0
	for i in range(10):
		v += i*m
		print(v, i, m)

very_strange_func("Some amazing text", 123, variable) # Dogs

test = func()
func2(len(test))

View Diff

3c3
< amazing_func("Some amazing text", 123, variable) # Kittens
---
> amazing_func(42, foobar, 'Another text') # Kittens
14c14
< very_strange_func(42, foobar, 'Another text') # Dogs
---
> very_strange_func("Some amazing text", 123, variable) # Dogs

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 245 remaining solutions by signing in and submitting your own entry
#246 tuyen / @tuyen66827418 - Score: 151 - 11/19/18 @ 14:57
%jj%jkhvwbbbbbbbby:14<CR>%hp%jkhxhXXXXXXXXXXXXXXXXXXXXXXXXXx:3<CR>%XXXXXXXXBBXXWXWxuXXXXXXXXXXXXXXXXXXXXXXXpu<50-53>(42, foobar, 'Another text')<Esc>[201~%hXXcxxa<Left>c<Esc>ZZ

0 comments


Created by: @Tpouhuk2

246 active golfers, 995 entries

Leaderboard (lowest score wins):
17
#121 - Bob_V / @Bob_V

12/04/2018 at 02:43PM

17
#122 - Timur Celik / @clktmr

12/20/2018 at 01:42PM

17
#123 - TimMcGuire / @mcguire

12/23/2018 at 07:06PM

17
#124 - Zeming Lin / @ebetica

01/17/2019 at 07:58PM

18
#125 - Dr. Rev. J. Lurch-artz / @JKirchartz

08/19/2018 at 05:42PM

18
#126 - Daniel Vaqueiro / @chimidea

08/25/2018 at 10:25AM

18
#127 - CAO Tien Duc / @tienduccao

09/11/2018 at 08:53PM

18
#128 - Imre Kerr / @imre_kerr

09/13/2018 at 12:51PM

18
#129 - René Czerny / @ReneCzerny

09/16/2018 at 10:19AM

18
#130 - h3x3sworld / @h3x3sworld

09/17/2018 at 12:25PM

18
#131 - Drill / @DrillTroll

09/24/2018 at 10:20PM

18
#132 - vimgolf / @myspare307

09/25/2018 at 05:19AM

18
#133 - Keyboard Fire / @KeyboardFire

10/06/2018 at 09:28PM

18
#134 - c0llision / @sh3llcode

10/20/2018 at 07:04AM

18
#135 - m472 / @m4729

10/27/2018 at 06:45AM

18
#136 - vg / @vg53210350

10/29/2018 at 02:26AM

18
#137 - name / @name65894813

11/14/2018 at 04:36PM

18
#138 - Ohad Rubin / @OhadRubin

11/15/2018 at 03:44PM

18
#139 - Álvaro Melgosa / @AlvaroMlgs

11/17/2018 at 02:36PM

18
#140 - John Smith / @JohnSmi14480159

01/09/2019 at 11:04PM

19
#141 - h43z / @h43z

08/11/2018 at 11:23PM

19
#142 - yqu212 / @yqu212

08/12/2018 at 01:47AM

19
#143 - Parrot Tech / @parrot_tech

08/13/2018 at 07:46AM

19
#144 - Shutterspot Photo / @shutterspot

08/13/2018 at 04:06PM

19
#145 - daniel / @daniel31464605

08/17/2018 at 07:34PM

19
#146 - Cathal McGuire / @cmcguire79

08/24/2018 at 04:00PM

19
#147 - Ryan Daniels / @RyanNeilDaniels

08/28/2018 at 08:55AM

19
#148 - Louis Palma / @Lou_C137

08/28/2018 at 07:53PM

19
#149 - Jan Wedekind / @wedesoft

09/01/2018 at 09:10PM

19
#150 - Kristian Lumme / @kristianlumme

09/04/2018 at 10:15AM