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

459 active golfers, 1985 entries

Leaderboard (lowest score wins):
14
#61 - Shaw C. / @Xiao_SCKii

11/30/2019 at 10:02AM

14
#62 - Matt Aschmann / @ma7hatter

12/03/2019 at 05:48PM

14
#63 - ErQ325 / @EQ325

12/05/2019 at 04:43PM

14
#64 - John Otters / @OttersJohn

12/17/2019 at 04:15AM

14
#65 - Soptik / @Soptik3

12/22/2019 at 12:06AM

14
#66 - Rishabh Chatterjee / @RishabhChatte14

12/23/2019 at 10:05AM

14
#67 - Delon / @delonleonard

12/26/2019 at 01:21PM

14
#68 - Francesco Minnocci / @fminnocci

12/28/2019 at 03:28PM

14
#69 - 임덕윤 / @SnLHUF5ZYJXqI1m

12/31/2019 at 01:08PM

14
#70 - Saki Gw / @Sakigw

01/08/2020 at 10:57AM

14
#71 - warwickrulez / @warwickrulez

01/25/2020 at 09:07PM

14
#72 - martynas-st / @st_martynas

01/30/2020 at 05:15PM

14
#73 - Tefe / @tefetic

01/31/2020 at 09:47PM

14
#74 - Kyle X. Clark / @KyXr_Clark

02/13/2020 at 07:05PM

14
#75 - stretchy / @stretch11013132

02/15/2020 at 03:16PM

14
#76 - howanto / @ho_wan_

02/20/2020 at 12:53PM

15
#77 - Jon Krause / @jkrause314

08/11/2018 at 05:14PM

15
#78 - Kerson Hsiao / @KersonHsiao

08/12/2018 at 12:47AM

15
#79 - Smylers / @Smylers2

08/12/2018 at 08:54PM

15
#80 - Charles Sun / @charles_sun90

08/13/2018 at 09:48PM

15
#81 - testingvimgolf / @testingvimgolf

08/14/2018 at 03:20AM

15
#82 - Keldwik Chaldain / @Suskeyhose

08/14/2018 at 07:59PM

15
#83 - 徐学健 / @zebrallel

08/15/2018 at 01:58AM

15
#84 - Søren Kjeil / @sfkjeil

08/15/2018 at 09:09AM

15
#85 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 12:19PM

15
#86 - Andre Cato / @DreBear800

08/18/2018 at 01:19AM

15
#87 - Артем Мухометзянов / @Timon_Surikat

08/18/2018 at 02:32PM

15
#88 - Rajesh Sharma / @deepredsky

08/18/2018 at 05:35PM

15
#89 - Sergio / @voyeg3r

08/19/2018 at 03:29PM

15
#90 - Coruja Queridinha / @miriamretka

08/19/2018 at 08:43PM