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 52bc9404cbab90000200001c

O Christmas Tree

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

Start file
^
End file
^

 
^
^^^

 
^
 
^^^
^^^^^

   
^
 
^^^
 
^^^^^
^^^^^^^

   
^
   
^^^
 
^^^^^
 
^^^^^^^
^^^^^^^^^

View Diff

2a3,20
>  ^
> ^^^
>
>   ^
>  ^^^
> ^^^^^
>
>    ^
>   ^^^
>  ^^^^^
> ^^^^^^^
>
>     ^
>    ^^^
>   ^^^^^
>  ^^^^^^^
> ^^^^^^^^^
>

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 42 remaining solutions by signing in and submitting your own entry
#43 Brian Peiris / @brianpeiris - Score: 59 - 12/28/13 @ 04:27
:set list<CR>qq0yGGp0<C-V>GI <Esc>Gkyyp0s^<Esc>$a^<Esc>Gd$qkk@qkkk@qkkkk@q:wq<CR>

0 comments


Created by: @udioica

43 active golfers, 109 entries

Leaderboard (lowest score wins):
31
#31 - Bobby R / @onethereis

12/26/2013 at 10:38PM

31
#32 - Matthew Kirk / @mjkirk

12/31/2013 at 06:16PM

31
#33 - Yann Moisan / @YannMoisan

01/01/2014 at 06:01PM

31
#34 - Justin Knag / @justinknag

10/14/2014 at 06:40PM

31
#35 - Andrew Smith / @amazing_andrew

08/14/2016 at 01:15AM

32
#36 - Erik Mainz / @ermainz

12/27/2013 at 05:32AM

32
#37 - Ryan Dwyer / @ryan_dwyer

06/05/2016 at 09:29PM

32
#38 - russellzhaomao / @russellzhaomao

06/12/2022 at 12:50PM

33
#39 - Jan Willem / @jagij

12/28/2013 at 03:15PM

33
#40 - Dmitry Teslenko / @krab_mozga

04/07/2014 at 08:05AM

34
#41 - Quota / @Quotad

01/10/2014 at 02:09PM

34
#42 - Andreas Källberg / @Anka213

01/17/2014 at 01:18AM

59
#43 - Brian Peiris / @brianpeiris

12/28/2013 at 04:27AM