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

371 active golfers, 1529 entries

Leaderboard (lowest score wins):
38
#361 - The Joe / @computerjoe708

03/17/2019 at 04:46PM

41
#362 - kevin / @kevin_sdc

09/02/2018 at 02:23AM

41
#363 - Patryk Jachowski / @y4ch_

11/10/2018 at 04:19PM

43
#364 - Toby R / @TobyRet

11/01/2018 at 09:11AM

45
#365 - Eric Moss / @NotEricMoss

11/06/2018 at 02:57AM

50
#366 - faraaz / @mfyk84

08/19/2018 at 08:55PM

53
#367 - Briana Baker / @brianacodes

12/21/2018 at 05:52PM

86
#368 - maxime he / @he_maxime

08/12/2018 at 07:05PM

88
#369 - lf123 / @qwwsaa123

09/12/2018 at 01:20PM

94
#370 - . / @jfkdk91

09/12/2018 at 10:57PM

151
#371 - tuyen / @tuyen66827418

11/19/2018 at 02:57PM