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 53f44761ba79e3000235fc6f

Comparing scores

If Alice and Bob both did the challenge, put their entries together in the top paragraph, so we can compare their scores more easily.

Start file
4d1a34ccfa85f32065000004 Alice: 15 # Simple text editing with Vim
4d1a8bf2b8cb3409320002c4 Alice: 12 # Search and Replace 0
4d1cdb0635b40650b8000527 Alice: 16 # Make Fancy Header
4d716c76919202611400002b Alice: 19 # Numbering a List
4f0720c8f037090001000007 Alice: 11 # switch variable
4fca29ddd3a0d40001000038 Alice: 8  # Remove semicolons after expressions
50048db8cdc4060002000004 Alice: 22 # Vertical Limit
508fe9f57acca60002000037 Alice: 13 # Stairs Indenting
5192f96ad8df110002000002 Alice: 16 # Words in parens

4d1a34ccfa85f32065000004 Bob: 13 # Simple text editing with Vim
4d1a8bf2b8cb3409320002c4 Bob: 14 # Search and Replace 0
4d1aaf2fb11838287d000036 Bob: 14 # Reverse characters in a line
4d2c9d06eda6262e4e00007a Bob: 19 # Assignment Alignment
4ef209ef78702b0001000019 Bob: 14 # Make it more readable
4f0720c8f037090001000007 Bob: 11 # switch variable
4fc9d767d3a0d4000100000e Bob: 12 # Append semicolon after expressions
50048db8cdc4060002000004 Bob: 23 # Vertical Limit
508fe9f57acca60002000037 Bob: 14 # Stairs Indenting
5192f96ad8df110002000002 Bob: 15 # Words in parens
End file
4d1a34ccfa85f32065000004 Alice: 15 # Simple text editing with Vim
4d1a34ccfa85f32065000004 Bob: 13 # Simple text editing with Vim
4d1a8bf2b8cb3409320002c4 Alice: 12 # Search and Replace 0
4d1a8bf2b8cb3409320002c4 Bob: 14 # Search and Replace 0
4f0720c8f037090001000007 Alice: 11 # switch variable
4f0720c8f037090001000007 Bob: 11 # switch variable
50048db8cdc4060002000004 Alice: 22 # Vertical Limit
50048db8cdc4060002000004 Bob: 23 # Vertical Limit
508fe9f57acca60002000037 Alice: 13 # Stairs Indenting
508fe9f57acca60002000037 Bob: 14 # Stairs Indenting
5192f96ad8df110002000002 Alice: 16 # Words in parens
5192f96ad8df110002000002 Bob: 15 # Words in parens

4d1cdb0635b40650b8000527 Alice: 16 # Make Fancy Header
4d716c76919202611400002b Alice: 19 # Numbering a List
4fca29ddd3a0d40001000038 Alice: 8  # Remove semicolons after expressions

4d1aaf2fb11838287d000036 Bob: 14 # Reverse characters in a line
4d2c9d06eda6262e4e00007a Bob: 19 # Assignment Alignment
4ef209ef78702b0001000019 Bob: 14 # Make it more readable
4fc9d767d3a0d4000100000e Bob: 12 # Append semicolon after expressions

View Diff

1d0
< 
2a2
> 4d1a34ccfa85f32065000004 Bob: 13 # Simple text editing with Vim
4,5c4
< 4d1cdb0635b40650b8000527 Alice: 16 # Make Fancy Header
< 4d716c76919202611400002b Alice: 19 # Numbering a List
---
> 4d1a8bf2b8cb3409320002c4 Bob: 14 # Search and Replace 0
7c6
< 4fca29ddd3a0d40001000038 Alice: 8  # Remove semicolons after expressions
---
> 4f0720c8f037090001000007 Bob: 11 # switch variable
8a8
> 50048db8cdc4060002000004 Bob: 23 # Vertical Limit
9a10
> 508fe9f57acca60002000037 Bob: 14 # Stairs Indenting
10a12,16
> 5192f96ad8df110002000002 Bob: 15 # Words in parens
> 
> 4d1cdb0635b40650b8000527 Alice: 16 # Make Fancy Header
> 4d716c76919202611400002b Alice: 19 # Numbering a List
> 4fca29ddd3a0d40001000038 Alice: 8  # Remove semicolons after expressions
12,13d17
< 4d1a34ccfa85f32065000004 Bob: 13 # Simple text editing with Vim
< 4d1a8bf2b8cb3409320002c4 Bob: 14 # Search and Replace 0
17d20
< 4f0720c8f037090001000007 Bob: 11 # switch variable
19,21d21
< 50048db8cdc4060002000004 Bob: 23 # Vertical Limit
< 508fe9f57acca60002000037 Bob: 14 # Stairs Indenting
< 5192f96ad8df110002000002 Bob: 15 # Words in parens

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 23 remaining solutions by signing in and submitting your own entry
#24 r. / rmarvie - Score: 51 - 12/20/14 @ 20:58
:sor<CR>"s2dd6G"addj"Add2k"b3dd2j"Bdd"AddG"sp"apG"bpZZ

0 comments

#25 Grigoriy Alexeev / GrigoriyAlexeev - Score: 59 - 08/23/14 @ 07:36
qqj:let n=line(".")<CR>ye:g/<C-R>"/m<C-R>=n<CR><CR>@qq@qgg"Add4j..jj.5j"apZZ

0 comments

#26 Jakob / jajob - Score: 65 - 08/28/14 @ 11:16
dd3Gddddjdd10Gddddddjdd:%sor<CR>ddG:reg<CR><CR>o<Esc>"8p"7p"6po<Esc>"5p"4p"3p"2pZZ

0 comments

#27 Fake Name / The_Real_User - Score: 66 - 08/21/14 @ 01:19
:%sort<CR>6jVjjjjdGp7kVkdGp5kV8j:g/Alice/d A<CR>4ko<CR><Esc>"apjjo<Esc>ggdd.13jddZZ

0 comments

#28 Oliver Christ / 0liverChrist - Score: 67 - 02/16/15 @ 14:39
:sor<CR>2dd5GV9G"adjjVj"bdGo<Esc>p"aPVG<Esc>kkkkkk"addj"bddjVj"cdo<Esc>"ap"bp"cpZZ

0 comments

#29 Fnord Everywhere / FnordE - Score: 69 - 08/21/14 @ 13:21
:%sor<CR>:1,2m21<CR>:5,8m21<CR>:5m21<CR>:7m21<CR>.:<Up><CR>:16m13<CR>:<Up><Left><Left><Left><BS>8<Right><Right><Right><BS>4<CR>:21m15<CR><Esc>:x<CR>

0 comments

Created by: udioica

29 active golfers, 68 entries

Leaderboard (lowest score wins):
18
#1 - Urtica dioica / udioica

08/21/2014 at 07:00AM

18
#2 - John Braxler / braxler

08/21/2014 at 01:58PM

20
#3 - Petro Тrouq / zulolosi

08/21/2014 at 04:51PM

21
#4 - Marco Biasini / biasmv

08/20/2014 at 07:51PM

21
#5 - Kerson Hsiao / KersonHsiao

08/23/2014 at 03:03AM

21
#6 - Phil Runninger / PhilRunninger

08/29/2014 at 08:25PM

21
#7 - ———đίxίє—flαтlίиє——— / _dixie_flatline

09/01/2014 at 04:33AM

21
#8 - pftb12345 / pftb12345

04/23/2015 at 02:45PM

21
#9 - 何晨 / hechen0_

09/22/2016 at 05:40PM

21
#10 - Denis Kaluznyy / Spy_Denis

08/17/2017 at 02:13PM

22
#11 - Tim Chase / gumnos

08/20/2014 at 10:50AM

22
#12 - April Gentle / chen327684096

08/23/2014 at 07:40AM

22
#13 - Saher El-Neklawy / saherneklawy

08/23/2014 at 04:00PM

30
#14 - Kai Yuan / kentyuan

08/20/2014 at 10:19AM

30
#15 - Zapata / Incredible_JFP

08/25/2014 at 07:20PM

31
#16 - Caek / Caek_

08/21/2014 at 05:24AM

33
#17 - RobertT / techrt2050

08/20/2014 at 07:12PM

33
#18 - madka / lachrimae_pavan

09/08/2014 at 02:58AM

34
#19 - ltn614 / ltn614

10/09/2015 at 02:53AM

42
#20 - mnx / mnxx

11/06/2014 at 10:49AM

43
#21 - James / Dronak

08/21/2014 at 02:29PM

45
#22 - AC / quadface

08/22/2014 at 10:43PM

49
#23 - Jezen Thomas / jezenthomas

08/20/2014 at 08:23AM

51
#24 - r. / rmarvie

12/20/2014 at 08:58PM

59
#25 - Grigoriy Alexeev / GrigoriyAlexeev

08/23/2014 at 07:36AM

65
#26 - Jakob / jajob

08/28/2014 at 11:16AM

66
#27 - Fake Name / The_Real_User

08/21/2014 at 01:19AM

67
#28 - Oliver Christ / 0liverChrist

02/16/2015 at 02:39PM

69
#29 - Fnord Everywhere / FnordE

08/21/2014 at 01:21PM