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

293 active golfers, 1181 entries

Leaderboard (lowest score wins):
16
#121 - Nir Givon / @nir_givon

11/11/2018 at 11:39AM

16
#122 - Timothy Michael Fox / @Timothy_M_Fox

12/04/2018 at 03:10PM

16
#123 - Rossi / @mrossinek

12/04/2018 at 10:01PM

16
#124 - Christopher Weyand / @swordman378

02/11/2019 at 05:13PM

17
#125 - Oka / @the_white_oak

08/11/2018 at 04:51PM

17
#126 - _Tpouhuk / @Tpouhuk2

08/11/2018 at 05:29PM

17
#127 - Jan Bundesmann / @janbundesmann

08/13/2018 at 08:59AM

17
#128 - Vova Blet / @VovaBlet

08/21/2018 at 08:17PM

17
#129 - Jorge / @jherreso

09/02/2018 at 05:06AM

17
#130 - chaotic / @laersn

09/07/2018 at 12:09PM

17
#131 - My Info / @michaelmdeng

09/19/2018 at 03:58AM

17
#132 - Marius Jurgelenas / @MarenasLT

09/21/2018 at 11:47AM

17
#133 - a / @UseForVim

10/04/2018 at 06:07AM

17
#134 - caplod / @caplod

10/17/2018 at 07:53PM

17
#135 - oracle / @oracle24986322

10/20/2018 at 04:59AM

17
#136 - Why Am / @WhysDeCatOnFire

11/08/2018 at 03:17AM

17
#137 - Andreas Nordahl / @andreasnordahl

11/12/2018 at 01:01PM

17
#138 - greengreen / @greengr09073862

11/15/2018 at 03:48PM

17
#139 - Levi Self / @LeviRSelf

11/18/2018 at 08:10AM

17
#140 - succcubbus / @succcubbus

11/20/2018 at 10:26PM

17
#141 - Michael Mangialardi / @michaelmangial1

11/29/2018 at 03:04PM

17
#142 - Maas Lalani / @maaslalani

12/02/2018 at 09:39PM

17
#143 - Bob_V / @Bob_V

12/04/2018 at 02:43PM

17
#144 - Timur Celik / @clktmr

12/20/2018 at 01:42PM

17
#145 - TimMcGuire / @mcguire

12/23/2018 at 07:06PM

17
#146 - Zeming Lin / @ebetica

01/17/2019 at 07:58PM

17
#147 - Kyle Safran / @kylesafran

01/23/2019 at 09:59PM

17
#148 - Amado Antonini / @AmadoAntonini

03/14/2019 at 07:38AM

18
#149 - Dr. Rev. J. "Burn For Heat" Kirchartz / @JKirchartz

08/19/2018 at 05:42PM

18
#150 - Daniel Vaqueiro / @chimidea

08/25/2018 at 10:25AM