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

404 active golfers, 1685 entries

Leaderboard (lowest score wins):
19
#241 - Ryan Daniels / @RyanNeilDaniels

08/28/2018 at 08:55AM

19
#242 - Louis Palma / @Lou_C137

08/28/2018 at 07:53PM

19
#243 - Jan Wedekind / @wedesoft

09/01/2018 at 09:10PM

19
#244 - Kristian Lumme / @kristianlumme

09/04/2018 at 10:15AM

19
#245 - Matt Tony / @Dark_Rider85

09/05/2018 at 08:38PM

19
#246 - Toby Runo / @toptab267

09/15/2018 at 01:26PM

19
#247 - davidkaskwith / @davidkaskwith

10/03/2018 at 12:59AM

19
#248 - Anthony George / @Xanuthatusu

10/29/2018 at 09:51PM

19
#249 - aka / @aaik4

12/23/2018 at 03:03AM

19
#250 - tenteke / @kuskus3

01/30/2019 at 03:17PM

19
#251 - Patrick Lavin / @LavinComputes

01/31/2019 at 08:00PM

19
#252 - andrwyoung / @andrwyoung1

03/03/2019 at 02:01AM

19
#253 - Jounathaen / @jounathaen

03/29/2019 at 10:42PM

19
#254 - duyanh.y4n.pham / @PhamY4n

06/11/2019 at 09:26PM

19
#255 - 임덕윤 / @SnLHUF5ZYJXqI1m

07/29/2019 at 09:10AM

19
#256 - André Reigoto / @AndreReigoto

08/12/2019 at 12:42AM

19
#257 - Sebastian Thomas / @SebastianTh0mas

09/03/2019 at 02:32PM

19
#258 - noisevoid / @noisevoid

09/05/2019 at 04:05PM

19
#259 - Eric Banisadr / @EBanisadr

09/06/2019 at 04:16PM

20
#260 - Christian Fosli / @porridge111

08/12/2018 at 10:26AM

20
#261 - Vladimir Parfinenko / @cypok

08/16/2018 at 02:05PM

20
#262 - Noel Qiao / @NoelQiao

08/17/2018 at 01:28AM

20
#263 - Alexander Covington / @ACov96

08/29/2018 at 08:55PM

20
#264 - Koo Zhengqun / @zhengqunkoo

09/24/2018 at 05:39AM

20
#265 - Dave Brda / @BrdaDave

10/25/2018 at 03:50PM

20
#266 - Steven Bell / @stevenbell

12/20/2018 at 01:30AM

20
#267 - Slawek Ligus / @ooz_ie

12/30/2018 at 05:40AM

20
#268 - Dany Alexander Caro Saavedra / @DanyAlexanderC7

01/02/2019 at 04:11AM

20
#269 - abgalphabet / @abgalphabet

01/13/2019 at 04:30AM

20
#270 - Thomas Surlykke / @THSurlykke

01/17/2019 at 12:03PM