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

419 active golfers, 1757 entries

Leaderboard (lowest score wins):
14
#31 - eric huang / @EricGodhand4826

05/04/2019 at 06:51PM

14
#32 - andysong / @suyangsong

05/15/2019 at 08:55PM

14
#33 - David McDonald / @dmcdona

05/19/2019 at 04:53AM

14
#34 - Дима / @dimkino

05/29/2019 at 10:31PM

14
#35 - mkaminaga / @mkmng3

06/05/2019 at 01:19PM

14
#36 - Miłosz Łakomy / @foobar01123

06/06/2019 at 07:02AM

14
#37 - Tim Dean / @Tmdean

06/06/2019 at 06:31PM

14
#38 - Sæther / @baltre1

06/07/2019 at 02:26PM

14
#39 - BunFluffman / @BFluffman

06/07/2019 at 06:03PM

14
#40 - majo senf / @majo_senf

06/14/2019 at 11:01AM

14
#41 - John Braxler / @braxler

06/18/2019 at 05:11PM

14
#42 - Neil Struthers / @struthersneil

07/17/2019 at 09:47AM

14
#43 - tschoschi / @Todesshnizzle

07/30/2019 at 09:58PM

14
#44 - sooqua / @sooqua

08/08/2019 at 11:43AM

14
#45 - XiaoXiaoLui / @XiaoXiaoLui1

08/16/2019 at 03:49AM

14
#46 - Martin Delille / @martinodelilo

08/22/2019 at 04:21PM

14
#47 - blub / @agorilladriving

08/29/2019 at 12:14PM

14
#48 - Madelyn Freed / @EcoBummer

09/04/2019 at 09:02PM

14
#49 - Zach Ingbretsen / @ZIngbretsen

09/06/2019 at 04:05PM

14
#50 - Cassandra / @kascein

09/17/2019 at 08:20AM

14
#51 - Viktor Styrud / @Visklol

09/27/2019 at 07:29AM

14
#52 - brypto / @hiimbenjy

09/30/2019 at 05:15AM

14
#53 - Adrian Craciun / @adi_craciun

10/06/2019 at 02:02PM

14
#54 - Tamás Kárándi / @tkarandi

10/19/2019 at 09:26PM

14
#55 - Gregory Furter / @gfurter

10/30/2019 at 02:02PM

14
#56 - Lory / @Lory46845742

11/01/2019 at 10:27AM

14
#57 - shoji541 / @shoji541

11/13/2019 at 03:21PM

14
#58 - skamgolf / @skamgolf

11/16/2019 at 03:08AM

14
#59 - mogitate / @mutemeat

11/16/2019 at 12:51PM

14
#60 - harmony_krieg / @harmony_krieg

11/17/2019 at 10:16AM