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

0 comments

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

0 comments

#117 DOUG BLACK / @dougblackio - Score: 16 - 04/08/13 @ 14:37
qa<C-V>GI <Esc>j$q11@aZZ

0 comments

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

0 comments

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

0 comments

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

0 comments

#121 Chase Stubblefield / @sterlingchase - Score: 19 - 11/02/12 @ 05:38
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

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

0 comments

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

0 comments

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

0 comments

#125 Omer Rauchwerger / @rauchy - Score: 19 - 11/18/12 @ 07:11
i <Esc>qqy^jPI <Esc>0q9@qZZ

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

#141 bogwonch / @bogwonch - Score: 34 - 10/30/12 @ 20: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

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

0 comments

#143 Lim Han / @tagore79 - Score: 69 - 11/04/12 @ 14: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

143 active golfers, 312 entries

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

12/31/2012 at 01:30AM

12
#2 - Marco Hinz / @_mhinz_

05/22/2013 at 09:41AM

12
#3 - Petro Тrouq / @zulolosi

05/31/2013 at 09:59PM

12
#4 - Ingo / @ist3fani

07/30/2013 at 03:08PM

12
#5 - John Papanastasiou / @JohnPapps

08/27/2013 at 07:06PM

12
#6 - Sam Rose / @samwhoo

08/27/2013 at 07:10PM

12
#7 - Yann Moisan / @YannMoisan

01/03/2014 at 07:13PM

12
#8 - pikaren / @REALpikaren

01/06/2014 at 03:35PM

12
#9 - Domingue Justin / @_jdomingue

01/10/2014 at 05:50PM

12
#10 - Yiyang Chen / @yiyangc91

03/15/2014 at 05:05PM

12
#11 - John Braxler / @braxler

04/14/2014 at 01:48PM

13
#12 - Conner McDaniel / @connermcd

10/30/2012 at 04:09PM

13
#13 - Rahul Krishnan / @rahulkrish

11/04/2012 at 04:59PM

13
#14 - Vasil Sakarov / @vsakarov

11/11/2012 at 07:57AM

13
#15 - x aizek / @xaizek

11/15/2012 at 09:05AM

13
#16 - Justin Love / @wondible

11/25/2012 at 10:26PM

13
#17 - Drew Neil / @nelstrom

11/27/2012 at 12:07AM

13
#18 - mattgibb / @mattgibb

11/27/2012 at 08:49PM

13
#19 - Jordan Eldredge / @captbaritone

12/01/2012 at 07:32AM

13
#20 - Kerson Hsiao / @KersonHsiao

01/03/2013 at 04:31AM

13
#21 - Joel Elkins / @dice_tea

03/05/2013 at 06:13AM

13
#22 - Trevor Powell / @DoomedBunnies

03/20/2013 at 11:18PM

13
#23 - Shoop Da Whoop / @ShoopDaWhoop8

06/06/2013 at 08:50PM

13
#24 - Bradd Szonye / @bszonye

07/13/2013 at 09:47AM

13
#25 - Aaron Bieber / @aaronbieber

07/19/2013 at 11:01PM

13
#26 - Raphael Saunier / @RaphaelSaunier

08/27/2013 at 07:21PM

13
#27 - Florian Rathgeber / @frathgeber

08/27/2013 at 07:41PM

13
#28 - US Dollar Price / @USDollarPrice

11/04/2013 at 08:58PM

13
#29 - Salleyron Julien / @juguul

01/06/2014 at 02:28PM

13
#30 - Fake Name / @The_Real_User

01/09/2014 at 03:25AM

13
#31 - Jared Meyering / @Jmeyering

03/12/2014 at 06:15PM

13
#32 - ZorgroZ / @ZorgroZ

04/12/2014 at 03:00PM

13
#33 - Felipe Jaramillo F / @mrfelipe

04/14/2014 at 02:06AM

13
#34 - David Shields / @salacio

04/22/2014 at 08:08PM

13
#35 - Philipp Aeschbach / @ihbmifqerg

10/10/2014 at 10:31PM

14
#36 - Tim Chase / @gumnos

10/30/2012 at 03:18PM

14
#37 - Danilo / @dbrgn

10/30/2012 at 03:19PM

14
#38 - Marcin Sza / @coot_

10/30/2012 at 07:53PM

14
#39 - john irving / @whimful

10/30/2012 at 11:26PM

14
#40 - Underhill Labs / @underhilllabs

10/30/2012 at 11:46PM

14
#41 - Tallak Tveide / @tallakt

10/31/2012 at 07:47AM

14
#42 - Nathan / @boysetsfrog

10/31/2012 at 10:13AM

14
#43 - Sisso Ananda / @365DayToNibbana

10/31/2012 at 10:20PM

14
#44 - Peter Anselmo / @peter_anselmo

11/01/2012 at 09:02PM

14
#45 - mazemult / @mazemult

11/02/2012 at 12:29AM

14
#46 - Pete Bevin / @pbevin

11/02/2012 at 05:25PM

14
#47 - G. Ahtune / @gahtune

11/03/2012 at 09:38AM

14
#48 - Kana Natsuno / @kana1

11/04/2012 at 02:52AM

14
#49 - Mikko Loponen / @lopossumi

11/04/2012 at 03:35PM

14
#50 - Victor Ramirez / @virako

11/05/2012 at 03:25AM

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

11/05/2012 at 02:08PM

14
#52 - Hubba / @HubbaBubbaFett

11/05/2012 at 08:38PM

14
#53 - Richard Howard / @rhowardiv

11/07/2012 at 04:58AM

14
#54 - Davidovich / @IamDavidovich

11/08/2012 at 01:33AM

14
#55 - tridactyla / @tridactyla

11/09/2012 at 10:28AM

14
#56 - Daniel / @dpaneda

11/10/2012 at 08:36PM

14
#57 - buz / @buzbone

11/11/2012 at 07:05PM

14
#58 - a24f0600 / @a24f0600

11/13/2012 at 07:42AM

14
#59 - 4L41N / @4L41N1

11/13/2012 at 07:52AM

14
#60 - Kerry Burke / @kurver

11/13/2012 at 11:43PM

14
#61 - ElasticSwarts / @EmileSwarts

11/18/2012 at 08:31PM

14
#62 - Timothée Carry / @pixelastic

11/20/2012 at 09:30AM

14
#63 - blamitter / @blamitter

11/21/2012 at 04:36PM

14
#64 - Lieven Keersmaekers / @LievenKeersmaek

11/24/2012 at 12:41PM

14
#65 - Felix Ingram / @lllamaboy

11/27/2012 at 08:30PM

14
#66 - Tom Cammann / @tea_sea

11/27/2012 at 08:37PM

14
#67 - Matt Mulder / @mxmul

12/14/2012 at 02:00AM

14
#68 - Michael / @patheticpat

12/16/2012 at 06:26PM

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

12/21/2012 at 05:08PM

14
#70 - DR / @dde81

12/23/2012 at 01:19AM

14
#71 - Alec Goebel / @zego5360

01/04/2013 at 05:42PM

14
#72 - Asmund Liseth / @Asmund_L

01/12/2013 at 05:43PM

14
#73 - Steve Tjoa / @stevetjoa

02/04/2013 at 08:20PM

14
#74 - Steven Herbst / @transistorman

02/25/2013 at 01:14AM

14
#75 - Addisu Taddese / @azeey

03/02/2013 at 07:23PM

14
#76 - gnobbles / @gnobbles

03/31/2013 at 12:09AM

14
#77 - Tyler / @tylerbindon

04/02/2013 at 06:50AM

14
#78 - Piotr Śniegowski / @PiotrSniegowski

06/06/2013 at 12:48PM

14
#79 - cj / @cj01101

08/08/2013 at 08:19PM

14
#80 - Bart of Denver / @bartofdenver

08/13/2013 at 12:29AM

14
#81 - Ed Zukowski / @dataoverflow

08/27/2013 at 07:23PM

14
#82 - Tim Mower / @timmow

08/27/2013 at 07:58PM

14
#83 - James / @Dronak

09/03/2013 at 11:15PM

14
#84 - RobertT / @techrt2050

09/10/2013 at 04:12AM

14
#85 - isayoldchap / @isayoldchap

09/11/2013 at 06:26AM

14
#86 - Stephen Drodge / @sjdrodge

09/19/2013 at 02:39AM

14
#87 - brett / @brettyukich

09/21/2013 at 10:19PM

14
#88 - Casey Dwyer / @caseydwyer

10/23/2013 at 12:28PM

14
#89 - bunnies president / @bunnies4p

10/27/2013 at 10:50PM

14
#90 - Joe T / @h2g2guy

11/01/2013 at 05:51AM

14
#91 - Sam Burk / @smwbk

12/21/2013 at 04:41AM

14
#92 - Quota / @Quotad

02/04/2014 at 10:01AM

14
#93 - Joonas Pihlajamaa / @jokkebk

02/25/2014 at 11:26AM

14
#94 - Thomas GUILLORY / @thomasguillory

03/12/2014 at 06:02PM

14
#95 - Endir / @Endir2

04/18/2014 at 01:24PM

14
#96 - Patrick Pitoscia / @Patrick03960431

08/20/2014 at 02:35AM

14
#97 - Dan Sackett / @dansackett

10/12/2014 at 07:15PM

14
#98 - eBrnd / @eBrnd

11/07/2014 at 06:39PM

14
#99 - Oliver Christ / @0liverChrist

02/16/2015 at 02:32PM

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

10/30/2012 at 03:59PM

15
#101 - Thomas Wickham / @mackwic

11/11/2012 at 06:15PM

15
#102 - Ker / @alin_ker

11/18/2012 at 04:22PM

15
#103 - David Barnett / @mu_mind

11/25/2012 at 07:07AM

15
#104 - Runar / @runarfu

01/12/2013 at 09:04AM

15
#105 - Radosław Majewski / @radomaj

01/22/2013 at 04:23PM

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

07/13/2013 at 12:45AM

15
#107 - Dave Aitken / @actionshrimp

08/27/2013 at 06:48PM

15
#108 - David Escribano / @DavidEGx

08/27/2013 at 07:47PM

15
#109 - Jeffrey Klein / @jeffwklein

09/09/2013 at 07:18PM

15
#110 - Khromenko Andrey / @ttydragon

11/23/2013 at 04:17PM

15
#111 - Ram Tamtam / @ramtamtamtam

07/18/2014 at 01:23PM

16
#112 - JTeo / @JTeosw

11/05/2012 at 05:51PM

16
#113 - Einar Lielmanis / @spicausis

11/07/2012 at 04:44PM

16
#114 - Jason Wolf / @zephyr_wolf

11/08/2012 at 01:09PM

16
#115 - Roland Schatz / @fl_Overmind

12/14/2012 at 12:09PM

16
#116 - Evan Shrubsole / @evanshrubsole

04/01/2013 at 03:28PM

16
#117 - DOUG BLACK / @dougblackio

04/08/2013 at 02:37PM

16
#118 - Hachez Floran / @FloranHachez

09/05/2013 at 09:27AM

17
#119 - Mathias Rav / @iaddquotes

11/13/2012 at 10:49PM

19
#120 - Darcy Parker / @DarcyParker

10/31/2012 at 11:46PM

19
#121 - Chase Stubblefield / @sterlingchase

11/02/2012 at 05:38AM

19
#122 - Miguel Sánchez / @miguelsr1987

11/07/2012 at 04:11PM

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

11/12/2012 at 10:57AM

19
#124 - makala noble / @mnoble01

11/13/2012 at 08:32AM

19
#125 - Omer Rauchwerger / @rauchy

11/18/2012 at 07:11AM

19
#126 - Jesper Petersson / @PeterssonJesper

11/19/2012 at 01:18PM

19
#127 - Garrett Oreilly / @garrett_oreilly

11/21/2012 at 05:51AM

19
#128 - Brian Stolz / @tecnobrat

11/21/2012 at 05:05PM

19
#129 - Ravi S Sinha / @ambidextrousTx

11/26/2012 at 08:47AM

19
#130 - Matt Walker / @_walkermatt

11/28/2012 at 06:07PM

19
#131 - Nathan / @NathanHarperoni

08/07/2013 at 02:36PM

19
#132 - Jacob Branaugh / @jacobbranaugh

06/25/2014 at 09:06PM

20
#133 - Alex Hammel / @AlexJHammel

12/27/2012 at 03:23PM

22
#134 - Paul Gideon Dann / @giddie

10/31/2012 at 02:10PM

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

01/31/2013 at 11:08PM

24
#136 - Murali Suriar / @msuriar

11/17/2012 at 10:59AM

25
#137 - Nicolas Friedli / @NicolasFriedli

10/31/2012 at 09:24PM

25
#138 - Raphael / @rnstlr

11/26/2013 at 11:36PM

25
#139 - Nicholas Lee-Hone / @NicholasLeeHone

10/13/2014 at 08:12PM

27
#140 - Eric Andres / @eric_m_andres

12/07/2012 at 08:54PM

34
#141 - bogwonch / @bogwonch

10/30/2012 at 08:03PM

46
#142 - Max Sherman / @johnislarry

11/12/2012 at 12:22PM

69
#143 - Lim Han / @tagore79

11/04/2012 at 02:19PM