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

305 active golfers, 1233 entries

Leaderboard (lowest score wins):
23
#241 - PJ Frazer / @pj_frazer

01/14/2019 at 01:32AM

23
#242 - sébastien megret / @sebmegret

02/03/2019 at 12:29PM

23
#243 - vince / @vincentvangott

03/03/2019 at 12:49PM

23
#244 - phoibos92@gmail.com / @phoibos92

04/14/2019 at 02:27PM

24
#245 - Vanildo S. Mangueira / @vanildo_souto

08/13/2018 at 01:57PM

24
#246 - editor3D / @editor3D

11/12/2018 at 06:45PM

24
#247 - xwlearn / @ixw1991

12/18/2018 at 04:32PM

24
#248 - Bao Dang / @baodang02

01/12/2019 at 06:48AM

24
#249 - Blah Blah / @BlahBla08410389

01/20/2019 at 06:44PM

24
#250 - Thomas Branch / @twighk

01/27/2019 at 01:44PM

24
#251 - py / @py97235249

01/31/2019 at 07:51AM

24
#252 - Michael Aquilina / @mikeaquilina4

02/02/2019 at 09:56PM

24
#253 - Emil Braserud / @Erdustiggen

03/16/2019 at 04:37PM

24
#254 - Vimfiz / @vimfiz

03/25/2019 at 11:05PM

25
#255 - Bernhard Brunner / @13brunner

08/29/2018 at 01:28PM

25
#256 - Matt Robinson / @mmrobins

09/14/2018 at 03:47PM

25
#257 - Ruben Paz / @IstarEldritch

09/15/2018 at 11:30PM

25
#258 - Paul Weaver / @UKWeaver

11/21/2018 at 07:33PM

25
#259 - Neil Johari / @neiljohari

12/18/2018 at 07:50AM

25
#260 - Luis Rodriguez / @luisthecoder

01/03/2019 at 04:38AM

25
#261 - Doug White / @POOGLIES1

02/04/2019 at 02:13PM

25
#262 - Banner B. Schafer / @BannerBSchafer

04/08/2019 at 04:32AM

26
#263 - Sören Schellhoff / @Jackokomm

11/18/2018 at 04:04PM

26
#264 - Shafiq Jetha / @sjetha

12/19/2018 at 03:37PM

26
#265 - Marcio M Pereira / @iviarcio

12/21/2018 at 02:25PM

26
#266 - 默罕默德 / @Rt6RjEAJ987Woes

01/31/2019 at 10:08AM

27
#267 - eden kl / @edenkl1

08/13/2018 at 11:49AM

27
#268 - Edras / @Edras41862627

08/15/2018 at 12:04PM

27
#269 - ggghhhttt / @ggghhhttt6

08/27/2018 at 03:20AM

27
#270 - minjikim / @minjiki38685196

09/11/2018 at 07:27AM