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):
15
#61 - bignos / @bignos2

09/24/2018 at 12:39PM

15
#62 - Brendan B Amdocs / @AmdocsB

09/26/2018 at 04:00PM

15
#63 - Yudi Matsuzake / @yudimatsuzake

09/26/2018 at 06:59PM

15
#64 - Will / @VVi11_I_AM

09/30/2018 at 09:13PM

15
#65 - Roger Bongers / @RogerBongers

10/02/2018 at 11:49AM

15
#66 - John Oleksowicz / @JohnOlek

10/05/2018 at 05:06PM

15
#67 - Taylor Shane Hawkins / @underempire

10/08/2018 at 08:32PM

15
#68 - Benjamin Kiesl / @BenjaminKiesl

10/10/2018 at 02:04PM

15
#69 - James LaChance / @FatBoyXPC

10/11/2018 at 08:31AM

15
#70 - Sam Kim / @samkimhis

10/11/2018 at 05:35PM

15
#71 - Sebastian Korten / @FlashKorten

10/12/2018 at 04:16PM

15
#72 - nobody that important / @nobodythatimpo2

10/12/2018 at 11:16PM

15
#73 - Chris Budetti / @ChrisBudetti

10/14/2018 at 02:02PM

15
#74 - GUL / @GUL_THE_TWITTO

10/24/2018 at 08:04AM

15
#75 - Daniel Hjelm / @dhjelm

10/26/2018 at 06:40PM

15
#76 - Finn Francis / @FinnFrancis

10/26/2018 at 08:46PM

15
#77 - Ole Mussmann / @isbjornlabs

10/28/2018 at 12:20AM

15
#78 - Mike Adams / @davis_cromwell

11/02/2018 at 03:27AM

15
#79 - ForVimGolfReally / @VimFor

11/08/2018 at 11:15PM

15
#80 - zaperrer / @zaperrer

11/09/2018 at 06:06PM

15
#81 - 唐偉 / @tangw

11/13/2018 at 03:02PM

15
#82 - Bruno Cunha / @bruncun

11/18/2018 at 01:39PM

15
#83 - Mihai / @mihaicristiant

11/27/2018 at 11:16AM

15
#84 - Marty Boren / @computerliker

12/07/2018 at 04:18AM

15
#85 - alex m / @al_mk_

12/12/2018 at 05:40PM

15
#86 - Ruby Sapphire / @RubySapphire20

12/14/2018 at 03:32AM

15
#87 - Mangeart Yoric / @yoricm

01/20/2019 at 10:41AM

15
#88 - chocolate / @chocola81394123

01/20/2019 at 03:29PM

15
#89 - churaki / @churaki

01/30/2019 at 08:06AM

15
#90 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 06:11AM