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

462 active golfers, 1994 entries

Leaderboard (lowest score wins):
19
#301 - Eric Banisadr / @EBanisadr

09/06/2019 at 04:16PM

19
#302 - Nguyen Van Bac / @taybacvt

01/19/2020 at 02:53PM

19
#303 - Falafel Palapel / @falafelpalapel

02/16/2020 at 05:58PM

20
#304 - Christian Fosli / @porridge111

08/12/2018 at 10:26AM

20
#305 - Vladimir Parfinenko / @cypok

08/16/2018 at 02:05PM

20
#306 - Noel Qiao / @NoelQiao

08/17/2018 at 01:28AM

20
#307 - Alexander Covington / @ACov96

08/29/2018 at 08:55PM

20
#308 - Koo Zhengqun / @zhengqunkoo

09/24/2018 at 05:39AM

20
#309 - Dave Brda / @BrdaDave

10/25/2018 at 03:50PM

20
#310 - Steven Bell / @stevenbell

12/20/2018 at 01:30AM

20
#311 - Slawek Ligus / @ooz_ie

12/30/2018 at 05:40AM

20
#312 - Dany Alexander Caro Saavedra / @DanyAlexanderC7

01/02/2019 at 04:11AM

20
#313 - abgalphabet / @abgalphabet

01/13/2019 at 04:30AM

20
#314 - Thomas Surlykke / @THSurlykke

01/17/2019 at 12:03PM

20
#315 - Elton Law / @d0nkrs

02/14/2019 at 04:12PM

20
#316 - Tobi R / @indyfree4711

03/06/2019 at 08:50PM

20
#317 - João Silva / @joaosilva155

03/08/2019 at 01:16PM

20
#318 - Askhat Sakhabiev / @Sakhabiev_Ashat

04/15/2019 at 12:01AM

20
#319 - Christian Nieves / @ctnieves_

05/20/2019 at 06:04AM

20
#320 - Crystal L / @Cartsly

07/13/2019 at 09:27PM

20
#321 - mirsemen / @mirsemen1

07/15/2019 at 09:56AM

20
#322 - Zen / @DanilaMihailov

09/08/2019 at 07:56AM

20
#323 - Iggy / @iggredible

09/12/2019 at 03:29AM

20
#324 - vimgolfer / @vimgolfer7

09/21/2019 at 06:26PM

20
#325 - Jonathan Medwig / @jmedwig

11/07/2019 at 12:54PM

20
#326 - Dan Kilman / @dan_kilman

12/19/2019 at 07:35PM

21
#327 - Chirag Joshi / @thechijos

08/12/2018 at 11:59PM

21
#328 - Frank Korf / @OMGFrank

08/14/2018 at 02:16PM

21
#329 - Fellow Millennium / @Fellow2000

09/03/2018 at 10:22AM

21
#330 - Alexander / @vlasyuk_a

09/04/2018 at 07:16PM