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 5039216a1eb07a0002000026

Sierpinski's Triangle

Build the famous fractal, Sierpinski's Triangle.

Start file
 ^
/_\ 
End file
                               ^
                              /_\
                             ^   ^
                            /_\ /_\
                           ^       ^
                          /_\     /_\
                         ^   ^   ^   ^
                        /_\ /_\ /_\ /_\
                       ^               ^
                      /_\             /_\
                     ^   ^           ^   ^
                    /_\ /_\         /_\ /_\
                   ^       ^       ^       ^
                  /_\     /_\     /_\     /_\
                 ^   ^   ^   ^   ^   ^   ^   ^
                /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\
               ^                               ^
              /_\                             /_\
             ^   ^                           ^   ^
            /_\ /_\                         /_\ /_\
           ^       ^                       ^       ^
          /_\     /_\                     /_\     /_\
         ^   ^   ^   ^                   ^   ^   ^   ^
        /_\ /_\ /_\ /_\                 /_\ /_\ /_\ /_\
       ^               ^               ^               ^
      /_\             /_\             /_\             /_\
     ^   ^           ^   ^           ^   ^           ^   ^
    /_\ /_\         /_\ /_\         /_\ /_\         /_\ /_\
   ^       ^       ^       ^       ^       ^       ^       ^
  /_\     /_\     /_\     /_\     /_\     /_\     /_\     /_\
 ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^
/_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\

View Diff

1,2c1,32
<  ^
< /_\ 
---
>                                ^
>                               /_\
>                              ^   ^
>                             /_\ /_\
>                            ^       ^
>                           /_\     /_\
>                          ^   ^   ^   ^
>                         /_\ /_\ /_\ /_\
>                        ^               ^
>                       /_\             /_\
>                      ^   ^           ^   ^
>                     /_\ /_\         /_\ /_\
>                    ^       ^       ^       ^
>                   /_\     /_\     /_\     /_\
>                  ^   ^   ^   ^   ^   ^   ^   ^
>                 /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\
>                ^                               ^
>               /_\                             /_\
>              ^   ^                           ^   ^
>             /_\ /_\                         /_\ /_\
>            ^       ^                       ^       ^
>           /_\     /_\                     /_\     /_\
>          ^   ^   ^   ^                   ^   ^   ^   ^
>         /_\ /_\ /_\ /_\                 /_\ /_\ /_\ /_\
>        ^               ^               ^               ^
>       /_\             /_\             /_\             /_\
>      ^   ^           ^   ^           ^   ^           ^   ^
>     /_\ /_\         /_\ /_\         /_\ /_\         /_\ /_\
>    ^       ^       ^       ^       ^       ^       ^       ^
>   /_\     /_\     /_\     /_\     /_\     /_\     /_\     /_\
>  ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^
> /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\ /_\

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 26 remaining solutions by signing in and submitting your own entry
#27 prathamnagpure / @prathamnagpure - Score: 3411 - 02/27/24 @ 19:52
<C-V>jhlllkjjhhh<Esc><C-V>lllkyjjojk<BS><BS><Esc>pk<C-V>kk<C->.>jjj<C-V>khhdl k ki     <Esc>pui <Esc>pu <Esc>ip<BS><Esc>puli<Esc>pullpul kllllllllllllpui <Esc>plllllllll <Esc>kllllllllllllllllli                                                               <Esc><C-V>hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyj<Esc>llpppppppppppppppppppppppppppppppppppujjjllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuj<Esc>hhhojk<BS><BS><BS><Esc>plhhhhhhhhhhpupjllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll<BS><BS>llllllllllli<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><Esc>i     <BS><BS><BS><BS><Esc>khjjyy100pkhhhhhhhhhhhhhhhhhhhhhhhhhh0kllllll<C-V>lllkylllpuhpulp<Esc>jhhhh<C-V>kkklllllll<Esc>la                                          <Esc>ja                                   <Esc>jjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh<C-V><C-K>kkkhhhhhhlhlhlhyjjjhhhhhhhhhhhhho<Esc>pullklllllllh<C-V>kkklllllyjjjjpulpullpullllkkkkhjjjllllll<C-V>kllllllkkdllllllllllllllllllllllllllllllllllllllllllllpjjjjllkjlllllli                                          <Esc>i  <Esc>puhip<BS><Esc>pulllllkjjjjjlllllllllllllllllllllki                     <BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><Esc>kkkkh<C-V>kkkhhhhhhhyjjjjpuhhhpllllllllpuhpjjjlllllllh<C-V>kkkkkkkkkkkkhhhhhhhhhhhyjjjjjjjjjhhhhhhhhhhhhkpulllplllllllllllllllpjjjjjjjjjkllllllllllllllkl<C-V>kkkkkkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhyjjjjjjjjjjjjjjjjllllllllllllllllhp<C-V>jjjjjjjjjjjjjjjjkllllllllllllllllllllllllllllllypu<C-P>jPuhhhhhhhhhhhhhhhhhpuhhhhhhhhhhhhhhhhhhhpullllllllllllllllllllllllllllllllllllllllllllllllljjjjjjjjjjjjjjjlllllllllllllllll<C-V>kkkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjhyjjhjjjjjjjjjjjj<C-V>kkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhpujjjjjjjjjjjjjjjjlllllllllllllllllllllllllllllllk<C-V><C-L>llllllllllllllllllllllllllllllllkhhkkkkkkkkkkkkkkyjjjjjjjjjjjjjjjjjjjjjjjjjjjkpukkkkkkkpukkpukkkkkkkkkkkkkkkkk<C-V>jjjjjjjjjjjjjjjllllllllllllllllllllllllllllllyjjjjjjjjjjjjjjjjjjkkpuhpuhhhhhhhhhhhhhhhhhhhhhhhhhhpukkkkkkkkkkkkkkkkpuhhhhhpuuu<C-R>jjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhkkkpulllu<C-R>jjjjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhhhhhhhkkkkkkkpuhhhhpuhhplllllllllllllllllllllllllllllpullpullllllllllllllllllllllllllllllllllllllllllllllll<C-V><NL>jjjjjjjjjjjjjjllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllldhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh<C-V><NL>jjjjjjjjjjjjjjjkllllllllllllllllllllllllllllllllylllllllllllllllllllllllllllllllp<ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><LeftMouse><LeftRelease><LeftMouse><LeftRelease><Esc>lllllll<C-V>kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhhhdjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk<C-V>kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkdllllllllllllllllllllllllllllllllllllllllllllhhlhd$jlllhd$jlld$jllhljljljljljlkkkkkklllllllljlllllllllllllllllllllllllllllllljjjjjjjjjjjjjjjjjjjjjjjjjjjlllllllllljhhhhhkkkkkkkkkkkkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhkkkkkkkljljljllhhhlld$jlllhd$jlld$jlld$jlld$jlld$jlld$jlld$jlld$jlld$jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.jll.<LeftMouse><LeftRelease><LeftMouse><LeftRelease><LeftMouse><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftRelease><LeftMouse><LeftRelease><LeftMouse><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftMouse><LeftRelease><LeftMouse><LeftRelease><LeftMouse><LeftRelease><Right><Right><Down><Right><Right><Right><Up><Up><Up><Up><Right><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Right><Right><Right><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down>100ddllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll<Esc><Esc>:wq<CR>

0 comments


Created by: @tbreisacher

27 active golfers, 86 entries

Leaderboard (lowest score wins):
25
#1 - Conner McDaniel / @connermcd

09/03/2012 at 07:39PM

25
#2 - Victor Ramirez / @virako

10/15/2012 at 09:42AM

25
#3 - Petro Π’rouq / @zulolosi

07/03/2013 at 06:23PM

25
#4 - John Braxler / @braxler

08/14/2018 at 03:12PM

25
#5 - Peppa Pig / @PeppaPigSg

06/01/2024 at 01:42PM

26
#6 - Urtica dioica / @udioica

08/30/2012 at 09:55PM

26
#7 - Γ‰douard M'tou / @DouardM

10/08/2012 at 09:20PM

26
#8 - πšƒπš’πšπš˜πšžπšŠπš— πšƒπšŽπš’πšœπšœπš’πšŽπš› / @TitouanT_

02/20/2019 at 03:20PM

26
#9 - sjcomp / @sjcomp

02/22/2019 at 10:24PM

29
#10 - Kerson Hsiao / @KersonHsiao

08/26/2012 at 04:37PM

29
#11 - wpr__ / @wpr____

03/10/2022 at 06:55PM

31
#12 - Justin Love / @wondible

09/04/2012 at 01:44AM

31
#13 - Jimmy McRascal / @JimmyMcRascal

07/12/2014 at 06:14AM

31
#14 - pftb12345 / @pftb12345

05/10/2015 at 02:40PM

31
#15 - Saki Gw / @Sakigw

04/28/2017 at 02:31PM

32
#16 - Smylers / @Smylers2

02/20/2019 at 02:59PM

34
#17 - Joonas Pihlajamaa / @jokkebk

03/28/2014 at 03:12PM

35
#18 - deigen / @deigen0

08/29/2012 at 07:55AM

36
#19 - Vasil Sakarov / @vsakarov

09/20/2012 at 01:12PM

41
#20 - Rod Knowlton / @codelahoma

09/04/2012 at 08:41PM

46
#21 - Bunwut Tson / @NbTson

11/07/2012 at 02:26PM

52
#22 - vansan / @VinceVansan

08/26/2012 at 10:24AM

74
#23 - Mac Heller-Ogden / @twosoul

11/10/2012 at 06:50PM

100
#24 - Krzysiek / @krzlew

08/25/2012 at 09:10PM

160
#25 - Tyler Breisacher / @tbreisacher

08/25/2012 at 07:08PM

160
#26 - nickGPT / @nickandbro

08/28/2024 at 07:56PM

3411
#27 - prathamnagpure / @prathamnagpure

02/27/2024 at 07:52PM