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


#35 Fnord Everywhere / @FnordE - Score: 67 - 05/11/20 @ 14:11
:%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>ZZ

0 comments


Created by: @udioica

35 active golfers, 112 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

18
#3 - Peppa Pig / @PeppaPigSg

08/09/2024 at 01:02AM

20
#4 - Petro Тrouq / @zulolosi

08/21/2014 at 04:51PM

21
#5 - Marco Biasini / @biasmv

08/20/2014 at 07:51PM

21
#6 - Kerson Hsiao / @KersonHsiao

08/23/2014 at 03:03AM

21
#7 - Phil Runninger / @PhilRunninger

08/29/2014 at 08:25PM

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

09/01/2014 at 04:33AM

21
#9 - pftb12345 / @pftb12345

04/23/2015 at 02:45PM

21
#10 - 何晨 / @hechen0_

09/22/2016 at 05:40PM

21
#11 - Denis Kaluznyy / @Spy_Denis

08/17/2017 at 02:13PM

21
#12 - pikjes / @pikjes2

07/16/2021 at 07:19PM

21
#13 - blabla zincou / @BZincou

04/24/2022 at 11:12PM

21
#14 - nickGPT / @nickandbro

08/28/2024 at 11:25AM

22
#15 - Tim Chase / @gumnos

08/20/2014 at 10:50AM

22
#16 - April Gentle / @chen327684096

08/23/2014 at 07:40AM

22
#17 - Saher El-Neklawy / @saherneklawy

08/23/2014 at 04:00PM

22
#18 - mevmev / @mevmev8

09/21/2021 at 05:47PM

30
#19 - Kai Yuan / @kentyuan

08/20/2014 at 10:19AM

30
#20 - Zapata / @Incredible_JFP

08/25/2014 at 07:20PM

31
#21 - Caek / @Caek_

08/21/2014 at 05:24AM

32
#22 - quemeraisc / @quemeraisc

06/09/2022 at 01:35PM

33
#23 - RobertT / @techrt2050

08/20/2014 at 07:12PM

33
#24 - madka / @lachrimae_pavan

09/08/2014 at 02:58AM

34
#25 - ltn614 / @ltn614

10/09/2015 at 02:53AM

42
#26 - mnx / @mnxx

11/06/2014 at 10:49AM

43
#27 - James / @Dronak

08/21/2014 at 02:29PM

45
#28 - AC / @quadface

08/22/2014 at 10:43PM

49
#29 - Jezen Thomas / @jezenthomas

08/20/2014 at 08:23AM

51
#30 - r. / @rmarvie

12/20/2014 at 08:58PM