Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Leaderboard, Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 508fe9f57acca60002000037

Stairs Indenting

Indent each line with <line number> whitespaces.

Start file
1
2
3
4
5
6
7
8
9
10
End file
 1
  2
   3
    4
     5
      6
       7
        8
         9
          10

View Diff

1,10c1,10
< 1
< 2
< 3
< 4
< 5
< 6
< 7
< 8
< 9
< 10
---
>  1
>   2
>    3
>     4
>      5
>       6
>        7
>         8
>          9
>           10

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 112 remaining solutions by signing in and submitting your own entry
#113 Roland Schatz / @fl_Overmind - Score: 16 - 12/14/12 @ 04:09
qaPI <Esc>wy0jq9@aZZ

0 comments

#114 Evan Shrubsole / @evanshrubsole - Score: 16 - 04/01/13 @ 08:28
qqyw@"I <Esc>+q9@qZZ

0 comments

#115 Doug Black / @dougblackgt - Score: 16 - 04/08/13 @ 07:37
qa<C-V>GI <Esc>j$q11@aZZ

0 comments

#116 Hachez Floran / @FloranHachez - Score: 16 - 09/05/13 @ 02:27
<CR>:%norm <C-V><C-V>GI <CR>ZZ

0 comments

#117 Mathias Rav / @iaddquotes - Score: 17 - 11/13/12 @ 14:49
:%norm <C-V><C-V>GI <CR>:wq<CR>

0 comments

#118 Darcy Parker / @DarcyParker - Score: 19 - 10/31/12 @ 16:46
Oj.<Esc>9".pdd<C-V>GI <Esc>@"ZZ

0 comments

#119 Chase Stubblefield / @sterlingchase - Score: 19 - 11/01/12 @ 22:38
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#120 Miguel Sánchez / @miguelsr1987 - Score: 19 - 11/07/12 @ 08:11
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#121 Татос Бабаджанян / @snpdevone - Score: 19 - 11/12/12 @ 02:57
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#122 makala noble / @mnoble01 - Score: 19 - 11/13/12 @ 00:32
i <Esc>qq0y^jPi <Esc>q9@qZZ

0 comments

#123 Omer Rauchwerger / @rauchy - Score: 19 - 11/17/12 @ 23:11
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#124 Jesper Petersson / @PeterssonJesper - Score: 19 - 11/19/12 @ 05:18
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#125 Garrett Oreilly / @garrett_oreilly - Score: 19 - 11/20/12 @ 21:51
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#126 Brian Stolz / @tecnobrat - Score: 19 - 11/21/12 @ 09:05
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#127 Ravi S Sinha / @ambidextrousTx - Score: 19 - 11/26/12 @ 00:47
i <Esc>qay^jPi <Esc>0q9@aZZ

0 comments

#128 Matt Walker / @_walkermatt - Score: 19 - 11/28/12 @ 10:07
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

#129 Nathan / @NathanHarperoni - Score: 19 - 08/07/13 @ 07:36
Oj.<Esc>9".pdd<C-V>GI <Esc>@"ZZ

0 comments

#130 Jacob Branaugh / @jacobbranaugh - Score: 19 - 06/25/14 @ 14:06
I <Esc>qqywjPI <Esc>0q9@qZZ

0 comments

#131 Alex Hammel / @AlexJHammel - Score: 20 - 12/27/12 @ 07:23
i <Esc>qqYpi <Esc><C-A>q8@qjdGZZ

0 comments

#132 Paul Gideon Dann / @giddie - Score: 22 - 10/31/12 @ 07:10
i <Esc>jqqky^jPI <Esc>0jq8@QZZ

0 comments

#133 Adelar S. Queiróz / @adelarsq - Score: 22 - 01/31/13 @ 15:08
i <Esc>jqqky^jPI <Esc>j0q8@qZZ

0 comments

#134 Murali Suriar / @msuriar - Score: 24 - 11/17/12 @ 02:59
:set et sw=1<CR>qq>Gjq9@qZZ

0 comments

#135 Nicolas Friedli / @NicolasFriedli - Score: 25 - 10/31/12 @ 14:24
<C-V>GI <Esc><Down>.<Down>.<Down>.<Down>.<Down>.<Down>.<Down>.<Down>.<Down>.ZZ

0 comments

#136 Raphael / @rnstlr - Score: 25 - 11/26/13 @ 15:36
<C-V>GI <Esc>j.j.j.j.j.j.j.j.j.ZZ

0 comments

#137 Nicholas Lee-Hone / @NicholasLeeHone - Score: 25 - 10/13/14 @ 13:12
<C-V>GI <Esc>j.j.j.j.j.j.j.j.j.ZZ

0 comments

#138 Eric Andres / @eric_m_andres - Score: 27 - 12/07/12 @ 12:54
<C-V>GI <Esc>j.j.j.j.j.j.j.j.j.j<Esc>ZZ

0 comments

#139 bogwonch / @bogwonch - Score: 34 - 10/30/12 @ 13:03
qq"ayw:norm <C-R>ai <CR>qx:%norm @q<CR><Esc>:wq<CR>

@whimful: yo i'm just learning ... apparently ending with ZZ lowers your score more than :wq as an ending command :P

@coot_: another trick is to use :no<S-Tab> which expands to :normal

@giddie: You can also use <C-R>" to paste default register, meaning you can just do yw at the beginning instead of "ayw. You still seem to need "norm" in the first macro, but the second can be :%no<S-Tab>. I can get 28 out of this approach.

@giddie: In fact you can get 24 if you use <C-R><C-W> instead of yanking and pasting.

4 comments

#140 Max Sherman / @johnislarry - Score: 46 - 11/12/12 @ 04:22
qqi <Esc>qj2@qj3@qj4@qj5@qj6@qj7@qj8@qj9@qj10@q:x<CR>

0 comments

#141 Lim Han / @tagore79 - Score: 69 - 11/04/12 @ 06:19
1i <Esc>j2i <Esc>2i<Esc>j3i<Esc>i<Esc>3i <Esc>j4i <Esc>j5i <Esc>j6i <Esc>j7i <Esc>j8i <Esc>j9i <Esc>jh10i <Esc>j:21<BS><BS>wq!<CR>

0 comments

Created by: @dbrgn

141 active golfers, 310 entries

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

12/30/2012 at 05:30PM

12
#2 - Marco Hinz / @_mhinz_

05/22/2013 at 02:41AM

12
#3 - Petro Тrouq / @zulolosi

05/31/2013 at 02:59PM

12
#4 - Ingo / @ist3fani

07/30/2013 at 08:08AM

12
#5 - John Papanastasiou / @JohnPapps

08/27/2013 at 12:06PM

12
#6 - Sam Rose / @samwhoo

08/27/2013 at 12:10PM

12
#7 - Yann Moisan / @YannMoisan

01/03/2014 at 11:13AM

12
#8 - pikaren / @REALpikaren

01/06/2014 at 07:35AM

12
#9 - Domingue Justin / @_jdomingue

01/10/2014 at 09:50AM

12
#10 - Yiyang Chen / @yiyangc91

03/15/2014 at 10:05AM

12
#11 - John Braxler / @braxler

04/14/2014 at 06:48AM

13
#12 - Conner McDaniel / @connermcd

10/30/2012 at 09:09AM

13
#13 - Rahul Krishnan / @rahulkrish

11/04/2012 at 08:59AM

13
#14 - Vasil Sakarov / @vsakarov

11/10/2012 at 11:57PM

13
#15 - x aizek / @xaizek

11/15/2012 at 01:05AM

13
#16 - Justin Love / @wondible

11/25/2012 at 02:26PM

13
#17 - Drew Neil / @nelstrom

11/26/2012 at 04:07PM

13
#18 - mattgibb / @mattgibb

11/27/2012 at 12:49PM

13
#19 - Jordan Eldredge / @captbaritone

11/30/2012 at 11:32PM

13
#20 - Kerson Hsiao / @KersonHsiao

01/02/2013 at 08:31PM

13
#21 - Joel Elkins / @dice_tea

03/04/2013 at 10:13PM

13
#22 - Trevor Powell / @DoomedBunnies

03/20/2013 at 04:18PM

13
#23 - Shoop Da Whoop / @ShoopDaWhoop8

06/06/2013 at 01:50PM

13
#24 - Bradd Szonye / @bszonye

07/13/2013 at 02:47AM

13
#25 - Aaron Bieber / @aaronbieber

07/19/2013 at 04:01PM

13
#26 - Raphael Saunier / @RaphaelSaunier

08/27/2013 at 12:21PM

13
#27 - Florian Rathgeber / @frathgeber

08/27/2013 at 12:41PM

13
#28 - US Dollar Price / @USDollarPrice

11/04/2013 at 12:58PM

13
#29 - Salleyron Julien / @juguul

01/06/2014 at 06:28AM

13
#30 - Fake Name / @The_Real_User

01/08/2014 at 07:25PM

13
#31 - Jared Meyering / @Jmeyering

03/12/2014 at 11:15AM

13
#32 - ZorgroZ / @ZorgroZ

04/12/2014 at 08:00AM

13
#33 - Felipe Jaramillo F / @mrfelipe

04/13/2014 at 07:06PM

13
#34 - David Shields / @salacio

04/22/2014 at 01:08PM

13
#35 - Philipp Aeschbach / @ihbmifqerg

10/10/2014 at 03:31PM

14
#36 - Tim Chase / @gumnos

10/30/2012 at 08:18AM

14
#37 - Danilo / @dbrgn

10/30/2012 at 08:19AM

14
#38 - Marcin Sza / @coot_

10/30/2012 at 12:53PM

14
#39 - john irving / @whimful

10/30/2012 at 04:26PM

14
#40 - Underhill Labs / @underhilllabs

10/30/2012 at 04:46PM

14
#41 - Tallak Tveide / @tallakt

10/31/2012 at 12:47AM

14
#42 - Nathan / @boysetsfrog

10/31/2012 at 03:13AM

14
#43 - Sisso Ananda / @365DayToNibbana

10/31/2012 at 03:20PM

14
#44 - Peter Anselmo / @peter_anselmo

11/01/2012 at 02:02PM

14
#45 - mazemult / @mazemult

11/01/2012 at 05:29PM

14
#46 - Pete Bevin / @pbevin

11/02/2012 at 10:25AM

14
#47 - G. Ahtune / @gahtune

11/03/2012 at 02:38AM

14
#48 - Kana Natsuno / @kana1

11/03/2012 at 07:52PM

14
#49 - Mikko Loponen / @lopossumi

11/04/2012 at 07:35AM

14
#50 - Victor Ramirez / @virako

11/04/2012 at 07:25PM

14
#51 - 無ん垢の叫び / @john_ababa

11/05/2012 at 06:08AM

14
#52 - Hubba / @HubbaBubbaFett

11/05/2012 at 12:38PM

14
#53 - Richard Howard / @rhowardiv

11/06/2012 at 08:58PM

14
#54 - Davidovich / @IamDavidovich

11/07/2012 at 05:33PM

14
#55 - tridactyla / @tridactyla

11/09/2012 at 02:28AM

14
#56 - Daniel / @dpaneda

11/10/2012 at 12:36PM

14
#57 - buz / @buzbone

11/11/2012 at 11:05AM

14
#58 - a24f0600 / @a24f0600

11/12/2012 at 11:42PM

14
#59 - 4L41N / @4L41N1

11/12/2012 at 11:52PM

14
#60 - Kerry Burke / @kurver

11/13/2012 at 03:43PM

14
#61 - Emile Swarts / @EmileSwarts

11/18/2012 at 12:31PM

14
#62 - Timothée Carry / @pixelastic

11/20/2012 at 01:30AM

14
#63 - Moisès Gómez / @blamitter

11/21/2012 at 08:36AM

14
#64 - Lieven Keersmaekers / @LievenKeersmaek

11/24/2012 at 04:41AM

14
#65 - Felix Ingram / @lllamaboy

11/27/2012 at 12:30PM

14
#66 - Tom Cammann / @tea_sea

11/27/2012 at 12:37PM

14
#67 - Matt Mulder / @mxmul

12/13/2012 at 06:00PM

14
#68 - Michael / @patheticpat

12/16/2012 at 10:26AM

14
#69 - Édouard M'tou / @DouardM

12/21/2012 at 09:08AM

14
#70 - DR / @dde81

12/22/2012 at 05:19PM

14
#71 - Alec Goebel / @zego5360

01/04/2013 at 09:42AM

14
#72 - Asmund Liseth / @Asmund_L

01/12/2013 at 09:43AM

14
#73 - Steve Tjoa / @stevetjoa

02/04/2013 at 12:20PM

14
#74 - Steven Herbst / @transistorman

02/24/2013 at 05:14PM

14
#75 - Addisu Taddese / @azeey

03/02/2013 at 11:23AM

14
#76 - gnobbles / @gnobbles

03/30/2013 at 05:09PM

14
#77 - Tyler / @tylerbindon

04/01/2013 at 11:50PM

14
#78 - Piotr Śniegowski / @PiotrSniegowski

06/06/2013 at 05:48AM

14
#79 - cj / @cj01101

08/08/2013 at 01:19PM

14
#80 - Bart of Denver / @bartofdenver

08/12/2013 at 05:29PM

14
#81 - Ed Zukowski / @dataoverflow

08/27/2013 at 12:23PM

14
#82 - Tim Mower / @timmow

08/27/2013 at 12:58PM

14
#83 - James / @Dronak

09/03/2013 at 04:15PM

14
#84 - RobertT / @techrt2050

09/09/2013 at 09:12PM

14
#85 - isayoldchap / @isayoldchap

09/10/2013 at 11:26PM

14
#86 - Stephen Drodge / @sjdrodge

09/18/2013 at 07:39PM

14
#87 - brett / @brettyukich

09/21/2013 at 03:19PM

14
#88 - Casey Dwyer / @caseydwyer

10/23/2013 at 05:28AM

14
#89 - bunnies president / @bunnies4p

10/27/2013 at 03:50PM

14
#90 - Joe T / @h2g2guy

10/31/2013 at 10:51PM

14
#91 - Sam Burk / @smwbk

12/20/2013 at 08:41PM

14
#92 - Quota / @Quotad

02/04/2014 at 02:01AM

14
#93 - Joonas Pihlajamaa / @jokkebk

02/25/2014 at 03:26AM

14
#94 - Thomas GUILLORY / @thomasguillory

03/12/2014 at 11:02AM

14
#95 - Endir / @Endir2

04/18/2014 at 06:24AM

14
#96 - Patrick Pitoscia / @Patrick03960431

08/19/2014 at 07:35PM

14
#97 - Dan Sackett / @dansackett

10/12/2014 at 12:15PM

15
#98 - h_east (DDD ready) / @h_east

10/30/2012 at 08:59AM

15
#99 - Thomas Wickham / @mackwic

11/11/2012 at 10:15AM

15
#100 - Ker / @alin_ker

11/18/2012 at 08:22AM

15
#101 - David Barnett / @mu_mind

11/24/2012 at 11:07PM

15
#102 - Runar / @runarfu

01/12/2013 at 01:04AM

15
#103 - Radosław Majewski / @radomaj

01/22/2013 at 08:23AM

15
#104 - Woojung Kim 김우중 / @_kimwz

07/12/2013 at 05:45PM

15
#105 - Dave Aitken / @actionshrimp

08/27/2013 at 11:48AM

15
#106 - David Escribano / @DavidEGx

08/27/2013 at 12:47PM

15
#107 - Jeffrey Klein / @jeffwklein

09/09/2013 at 12:18PM

15
#108 - Khromenko Andrey / @ttydragon

11/23/2013 at 08:17AM

15
#109 - Ram Tamtam / @ramtamtamtam

07/18/2014 at 06:23AM

16
#110 - JTeo / @JTeosw

11/05/2012 at 09:51AM

16
#111 - Einar Lielmanis / @spicausis

11/07/2012 at 08:44AM

16
#112 - Jason Wolf / @zephyr_wolf

11/08/2012 at 05:09AM

16
#113 - Roland Schatz / @fl_Overmind

12/14/2012 at 04:09AM

16
#114 - Evan Shrubsole / @evanshrubsole

04/01/2013 at 08:28AM

16
#115 - Doug Black / @dougblackgt

04/08/2013 at 07:37AM

16
#116 - Hachez Floran / @FloranHachez

09/05/2013 at 02:27AM

17
#117 - Mathias Rav / @iaddquotes

11/13/2012 at 02:49PM

19
#118 - Darcy Parker / @DarcyParker

10/31/2012 at 04:46PM

19
#119 - Chase Stubblefield / @sterlingchase

11/01/2012 at 10:38PM

19
#120 - Miguel Sánchez / @miguelsr1987

11/07/2012 at 08:11AM

19
#121 - Татос Бабаджанян / @snpdevone

11/12/2012 at 02:57AM

19
#122 - makala noble / @mnoble01

11/13/2012 at 12:32AM

19
#123 - Omer Rauchwerger / @rauchy

11/17/2012 at 11:11PM

19
#124 - Jesper Petersson / @PeterssonJesper

11/19/2012 at 05:18AM

19
#125 - Garrett Oreilly / @garrett_oreilly

11/20/2012 at 09:51PM

19
#126 - Brian Stolz / @tecnobrat

11/21/2012 at 09:05AM

19
#127 - Ravi S Sinha / @ambidextrousTx

11/26/2012 at 12:47AM

19
#128 - Matt Walker / @_walkermatt

11/28/2012 at 10:07AM

19
#129 - Nathan / @NathanHarperoni

08/07/2013 at 07:36AM

19
#130 - Jacob Branaugh / @jacobbranaugh

06/25/2014 at 02:06PM

20
#131 - Alex Hammel / @AlexJHammel

12/27/2012 at 07:23AM

22
#132 - Paul Gideon Dann / @giddie

10/31/2012 at 07:10AM

22
#133 - Adelar S. Queiróz / @adelarsq

01/31/2013 at 03:08PM

24
#134 - Murali Suriar / @msuriar

11/17/2012 at 02:59AM

25
#135 - Nicolas Friedli / @NicolasFriedli

10/31/2012 at 02:24PM

25
#136 - Raphael / @rnstlr

11/26/2013 at 03:36PM

25
#137 - Nicholas Lee-Hone / @NicholasLeeHone

10/13/2014 at 01:12PM

27
#138 - Eric Andres / @eric_m_andres

12/07/2012 at 12:54PM

34
#139 - bogwonch / @bogwonch

10/30/2012 at 01:03PM

46
#140 - Max Sherman / @johnislarry

11/12/2012 at 04:22AM

69
#141 - Lim Han / @tagore79

11/04/2012 at 06:19AM