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

351 active golfers, 1445 entries

Leaderboard (lowest score wins):
17
#151 - _Tpouhuk / @Tpouhuk2

08/11/2018 at 05:29PM

17
#152 - Jan Bundesmann / @janbundesmann

08/13/2018 at 08:59AM

17
#153 - Vova Blet / @VovaBlet

08/21/2018 at 08:17PM

17
#154 - Jorge / @jherreso

09/02/2018 at 05:06AM

17
#155 - chaotic / @laersn

09/07/2018 at 12:09PM

17
#156 - My Info / @michaelmdeng

09/19/2018 at 03:58AM

17
#157 - Marius Jurgelenas / @MarenasLT

09/21/2018 at 11:47AM

17
#158 - a / @UseForVim

10/04/2018 at 06:07AM

17
#159 - caplod / @caplod

10/17/2018 at 07:53PM

17
#160 - oracle / @oracle24986322

10/20/2018 at 04:59AM

17
#161 - Why Am / @WhysDeCatOnFire

11/08/2018 at 03:17AM

17
#162 - Andreas Nordahl / @andreasnordahl

11/12/2018 at 01:01PM

17
#163 - greengreen / @greengr09073862

11/15/2018 at 03:48PM

17
#164 - Levi Self / @LeviRSelf

11/18/2018 at 08:10AM

17
#165 - succcubbus / @succcubbus

11/20/2018 at 10:26PM

17
#166 - Michael Mangialardi / @michaelmangial1

11/29/2018 at 03:04PM

17
#167 - Maas Lalani / @maaslalani

12/02/2018 at 09:39PM

17
#168 - Bob_V / @Bob_V

12/04/2018 at 02:43PM

17
#169 - Timur Celik / @clktmr

12/20/2018 at 01:42PM

17
#170 - TimMcGuire / @mcguire

12/23/2018 at 07:06PM

17
#171 - Zeming Lin / @ebetica

01/17/2019 at 07:58PM

17
#172 - Kyle Safran / @kylesafran

01/23/2019 at 09:59PM

17
#173 - Amado Antonini / @AmadoAntonini

03/14/2019 at 07:38AM

17
#174 - wanghbxxxx / @wanghbxxxx

04/01/2019 at 02:43AM

17
#175 - Shreyas Balaji / @balaji_shreyas

05/05/2019 at 11:25PM

17
#176 - Caleb Rollins / @CalebRollins1

05/28/2019 at 05:49PM

17
#177 - Scott Schlesier / @sschlesier

06/29/2019 at 06:44AM

18
#178 - Dr. Rev. J. "Paranoid Android" Kirchartz / @JKirchartz

08/19/2018 at 05:42PM

18
#179 - Daniel Vaqueiro / @chimidea

08/25/2018 at 10:25AM

18
#180 - CAO Tien Duc / @tienduccao

09/11/2018 at 08:53PM