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 350 remaining solutions by signing in and submitting your own entry
#351 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

351 active golfers, 1445 entries

Leaderboard (lowest score wins):
34
#331 - KTL / @katielundsgaard

08/17/2018 at 10:52PM

34
#332 - vimgolfer1234 / @vimgolfer12342

10/25/2018 at 12:20AM

34
#333 - Hao-Ting Wang / @HaoTingW713

06/20/2019 at 02:23PM

35
#334 - pankaj singh / @pankajsingh013

01/14/2019 at 04:02PM

35
#335 - Vim Golfer / @VimGolfer6

07/08/2019 at 01:10PM

36
#336 - Praful / @praful_kapadia

08/15/2018 at 01:47PM

36
#337 - LadyScream / @TheLadyScream

08/27/2018 at 03:55AM

36
#338 - FP / @FPjde

09/16/2018 at 04:17PM

36
#339 - Martin Nordgren / @MartinJNordgren

09/21/2018 at 09:12AM

37
#340 - Chris / @Rephiscorth

08/24/2018 at 10:01PM

38
#341 - The Joe / @computerjoe708

03/17/2019 at 04:46PM

41
#342 - kevin / @kevin_sdc

09/02/2018 at 02:23AM

41
#343 - Patryk Jachowski / @y4ch_

11/10/2018 at 04:19PM

43
#344 - Toby R / @TobyRet

11/01/2018 at 09:11AM

45
#345 - Eric Moss / @NotEricMoss

11/06/2018 at 02:57AM

50
#346 - faraaz / @mfyk84

08/19/2018 at 08:55PM

53
#347 - Briana Baker / @brianacodes

12/21/2018 at 05:52PM

86
#348 - maxime he / @he_maxime

08/12/2018 at 07:05PM

88
#349 - lf123 / @qwwsaa123

09/12/2018 at 01:20PM

94
#350 - . / @jfkdk91

09/12/2018 at 10:57PM

151
#351 - tuyen / @tuyen66827418

11/19/2018 at 02:57PM