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

325 active golfers, 1331 entries

Leaderboard (lowest score wins):
17
#151 - Why Am / @WhysDeCatOnFire

11/08/2018 at 03:17AM

17
#152 - Andreas Nordahl / @andreasnordahl

11/12/2018 at 01:01PM

17
#153 - greengreen / @greengr09073862

11/15/2018 at 03:48PM

17
#154 - Levi Self / @LeviRSelf

11/18/2018 at 08:10AM

17
#155 - succcubbus / @succcubbus

11/20/2018 at 10:26PM

17
#156 - Michael Mangialardi / @michaelmangial1

11/29/2018 at 03:04PM

17
#157 - Maas Lalani / @maaslalani

12/02/2018 at 09:39PM

17
#158 - Bob_V / @Bob_V

12/04/2018 at 02:43PM

17
#159 - Timur Celik / @clktmr

12/20/2018 at 01:42PM

17
#160 - TimMcGuire / @mcguire

12/23/2018 at 07:06PM

17
#161 - Zeming Lin / @ebetica

01/17/2019 at 07:58PM

17
#162 - Kyle Safran / @kylesafran

01/23/2019 at 09:59PM

17
#163 - Amado Antonini / @AmadoAntonini

03/14/2019 at 07:38AM

17
#164 - wanghbxxxx / @wanghbxxxx

04/01/2019 at 02:43AM

17
#165 - Shreyas Balaji / @balaji_shreyas

05/05/2019 at 11:25PM

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

08/19/2018 at 05:42PM

18
#167 - Daniel Vaqueiro / @chimidea

08/25/2018 at 10:25AM

18
#168 - CAO Tien Duc / @tienduccao

09/11/2018 at 08:53PM

18
#169 - Imre Kerr / @imre_kerr

09/13/2018 at 12:51PM

18
#170 - René Czerny / @ReneCzerny

09/16/2018 at 10:19AM

18
#171 - h3x3sworld / @h3x3sworld

09/17/2018 at 12:25PM

18
#172 - Drill / @DrillTroll

09/24/2018 at 10:20PM

18
#173 - vimgolf / @myspare307

09/25/2018 at 05:19AM

18
#174 - Keyboard Fire / @KeyboardFire

10/06/2018 at 09:28PM

18
#175 - c0llision / @sh3llcode

10/20/2018 at 07:04AM

18
#176 - m472 / @m4729

10/27/2018 at 06:45AM

18
#177 - vg / @vg53210350

10/29/2018 at 02:26AM

18
#178 - name / @name65894813

11/14/2018 at 04:36PM

18
#179 - Ohad Rubin / @OhadRubin

11/15/2018 at 03:44PM

18
#180 - Álvaro Melgosa / @AlvaroMlgs

11/17/2018 at 02:36PM