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):
20
#241 - Slawek Ligus / @ooz_ie

12/30/2018 at 05:40AM

20
#242 - Dany Alexander Caro Saavedra / @DanyAlexanderC7

01/02/2019 at 04:11AM

20
#243 - abgalphabet / @abgalphabet

01/13/2019 at 04:30AM

20
#244 - Thomas Surlykke / @THSurlykke

01/17/2019 at 12:03PM

20
#245 - Elton Law / @d0nkrs

02/14/2019 at 04:12PM

20
#246 - Tobi R / @indyfree4711

03/06/2019 at 08:50PM

20
#247 - João Silva / @joaosilva155

03/08/2019 at 01:16PM

20
#248 - Askhat Sakhabiev / @Sakhabiev_Ashat

04/15/2019 at 12:01AM

20
#249 - Christian Nieves / @ctnieves_

05/20/2019 at 06:04AM

20
#250 - Crystal L / @Cartsly

07/13/2019 at 09:27PM

20
#251 - mirsemen / @mirsemen1

07/15/2019 at 09:56AM

21
#252 - Chirag Joshi / @thechijos

08/12/2018 at 11:59PM

21
#253 - Frank Korf / @OMGFrank

08/14/2018 at 02:16PM

21
#254 - Fellow Millennium / @Fellow2000

09/03/2018 at 10:22AM

21
#255 - Alexander / @vlasyuk_a

09/04/2018 at 07:16PM

21
#256 - Daniel Morandini / @MorandiniDaniel

09/19/2018 at 08:55AM

21
#257 - Reuben Narkwo / @reubwo

10/21/2018 at 07:22PM

21
#258 - Sxcy / @SxcyX

10/24/2018 at 08:01AM

21
#259 - Calvin Fong / @LordyBaka

11/03/2018 at 11:05AM

21
#260 - Zenghanzhang / @hzengroger

11/10/2018 at 06:36AM

21
#261 - Jes / @vim_jes

12/05/2018 at 12:33PM

21
#262 - Vending Machine / @storyn26383

12/16/2018 at 07:05AM

21
#263 - Bennett / @bennettbackward

12/18/2018 at 02:25PM

21
#264 - omrisarig / @omrisarig

01/09/2019 at 06:46PM

21
#265 - Kevin Ullmann / @kevosauce

01/15/2019 at 12:12AM

21
#266 - vim_ninja / @NinjaVim

08/19/2019 at 04:10AM

22
#267 - 安藤 / @andou2106

09/03/2018 at 03:12PM

22
#268 - Ketan Agrawal / @_ketan0_

09/24/2018 at 03:59PM

22
#269 - Edouard Piette / @EdPiette

10/09/2018 at 09:56AM

22
#270 - Dax / @daaawx

10/15/2018 at 07:39PM