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 498 remaining solutions by signing in and submitting your own entry
#499 ser / @ser_robo - Score: 154 - 02/29/20 @ 08:36
jjr<Esc>wwciwcjhh<Esc>hhhhce42,<Esc>wcf"foobar<Esc>wwce''h<BS><Left>Another text<Esc>wwce<Esc>hxx<Esc>r<Esc>jjjjjj154<BS><BS>14Geeehce""<Left>Some amazing text<Esc>r<Esc>ewce123<Esc>wwce<Esc>c<Esc>llcf'variable<Esc>ba<Esc>i<BS><Esc>jjj<Esc>:wq<CR>

0 comments


Created by: @Tpouhuk2

499 active golfers, 2165 entries

Leaderboard (lowest score wins):
14
#61 - Shaw C. / @Xiao_SCKii

11/30/2019 at 10:02AM

14
#62 - Matt Aschmann / @ma7hatter

12/03/2019 at 05:48PM

14
#63 - ErQ325 / @EQ325

12/05/2019 at 04:43PM

14
#64 - John Otters / @OttersJohn

12/17/2019 at 04:15AM

14
#65 - Soptik / @Soptik3

12/22/2019 at 12:06AM

14
#66 - Rishabh Chatterjee / @RishabhChatte14

12/23/2019 at 10:05AM

14
#67 - Delon / @delonleonard

12/26/2019 at 01:21PM

14
#68 - Francesco Minnocci / @fminnocci

12/28/2019 at 03:28PM

14
#69 - 임덕윤 / @SnLHUF5ZYJXqI1m

12/31/2019 at 01:08PM

14
#70 - Saki Gw / @Sakigw

01/08/2020 at 10:57AM

14
#71 - warwickrulez / @warwickrulez

01/25/2020 at 09:07PM

14
#72 - martynas-st / @st_martynas

01/30/2020 at 05:15PM

14
#73 - Tefe / @tefetic

01/31/2020 at 09:47PM

14
#74 - Kyle X. Clark / @KyXr_Clark

02/13/2020 at 07:05PM

14
#75 - stretchy / @stretch11013132

02/15/2020 at 03:16PM

14
#76 - howanto / @ho_wan_

02/20/2020 at 12:53PM

14
#77 - Mushan Yang / @mushanyoung

02/26/2020 at 03:04AM

14
#78 - countime / @countime1

03/06/2020 at 04:29AM

14
#79 - Sean Dewar / @seandewar

03/13/2020 at 07:20PM

14
#80 - Marco / @Marco24456514

03/21/2020 at 10:58PM

14
#81 - edvrds / @edvrds

04/16/2020 at 03:53PM

14
#82 - Moatvald / @moatvald

04/19/2020 at 08:56AM

14
#83 - Arthur Goodman / @ArthurGoodman3

04/30/2020 at 11:31AM

14
#84 - Bhagwan / @El_Bhagwan

05/11/2020 at 09:24AM

14
#85 - 于吉星 / @fishermryn

05/25/2020 at 09:39AM

14
#86 - Valdimar / @genkobar

06/03/2020 at 01:15AM

14
#87 - vimgolf-sensei / @VimgolfS

06/03/2020 at 02:51PM

14
#88 - 大矢元海 / @008Genkai

07/05/2020 at 12:45AM

15
#89 - Jon Krause / @jkrause314

08/11/2018 at 05:14PM

15
#90 - Kerson Hsiao / @KersonHsiao

08/12/2018 at 12:47AM