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

442 active golfers, 1886 entries

Leaderboard (lowest score wins):
25
#391 - 김형창 / @uVmEMZsCgcYvqZi

04/24/2019 at 10:05AM

25
#392 - deHman89 / @danho89

06/06/2019 at 01:29PM

26
#393 - Sören Schellhoff / @Jackokomm

11/18/2018 at 04:04PM

26
#394 - Shafiq Jetha / @sjetha

12/19/2018 at 03:37PM

26
#395 - Marcio M Pereira / @iviarcio

12/21/2018 at 02:25PM

26
#396 - 默罕默德 / @Rt6RjEAJ987Woes

01/31/2019 at 10:08AM

27
#397 - eden kl / @edenkl1

08/13/2018 at 11:49AM

27
#398 - Edras / @Edras41862627

08/15/2018 at 12:04PM

27
#399 - ggghhhttt / @ggghhhttt6

08/27/2018 at 03:20AM

27
#400 - minjikim / @minjiki38685196

09/11/2018 at 07:27AM

27
#401 - ary31415 / @ary31415

10/29/2018 at 07:18AM

27
#402 - Nicolas Daval / @ndaval

04/08/2019 at 06:39PM

28
#403 - Webdeveloper⭐⭐ / @refschool

11/09/2018 at 08:35PM

28
#404 - Oren Koriat / @KoriatOren

12/05/2018 at 06:49PM

29
#405 - sstar / @sstar60015687

12/26/2018 at 09:41AM

29
#406 - LUTZ Jean / @Croustibot

03/05/2019 at 03:39PM

29
#407 - Aaron / @_Lordofthevoid_

11/23/2019 at 11:47AM

30
#408 - Andreas Bolstad / @andreasblstd

09/02/2018 at 11:44AM

30
#409 - urandom / @ttyrandom

10/20/2018 at 12:54PM

30
#410 - i33 / @i3342th

11/01/2018 at 05:54AM

30
#411 - Jurica / @Jurica34581259

11/14/2018 at 11:24PM

30
#412 - lofoneax / @lofoneax

01/23/2019 at 05:55AM

30
#413 - Apex Predatoe / @EthanMcQuarrie

04/23/2019 at 01:35PM

31
#414 - Julià Mestieri / @julimestieri

09/13/2018 at 05:45AM

31
#415 - 李超 / @lichaorodxx

03/10/2019 at 04:48AM

31
#416 - Phoon / @justflashhim

05/10/2019 at 02:42PM

32
#417 - Ainsley McGrath / @whole_grainsley

12/25/2018 at 05:10AM

32
#418 - hn9u / @hn9u

03/05/2019 at 03:22PM

32
#419 - 大木建人 / @2357gi

03/29/2019 at 08:19AM

32
#420 - ENSORIZATION / @ensorization

11/01/2019 at 11:55PM