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 524e1a20b81fe50002000008

attr_aligner

Two attr keywords. Two separate indentations. Align the colons.

Start file
attr_reader :align, :variables, :with
attr_accessor :spaces, :to, :complete, :challenge
# vim: set expandtab:
End file
attr_reader :align,
            :variables,
            :with
attr_accessor :spaces,
              :to,
              :complete,
              :challenge
# vim: set expandtab:

View Diff

1,2c1,7
< attr_reader :align, :variables, :with
< attr_accessor :spaces, :to, :complete, :challenge
---
> attr_reader :align,
>             :variables,
>             :with
> attr_accessor :spaces,
>               :to,
>               :complete,
>               :challenge

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 620 remaining solutions by signing in and submitting your own entry
#621 ren / @wxoc - Score: 134 - 02/10/14 @ 07:05
f,a<CR><C-C><C-C>f,a<CR>j<C-H><C-C><C-C>jf,<CR>kf,a<CR><C-C><C-C>f,a<CR><C-C><C-C>f,<CR>klf,a<CR><C-C><C-C>ggvjjj=vgG<C-V><Esc>jlllllllli<Tab><C-C><C-C>ui    <C-C><C-C>jhhhi    <C-C><C-C>jjhhhi      <C-C><C-C>jhhhhhi      <C-C><C-C>jhhhhhi      <C-C><C-C>:wq<CR>

0 comments


Created by: @udioica

621 active golfers, 2968 entries

Leaderboard (lowest score wins):
25
#211 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 04:53AM

26
#212 - Oliver Christ / @0liverChrist

10/05/2013 at 03:29PM

26
#213 - Marcin Sza / @coot_

10/09/2013 at 06:59PM

26
#214 - Sencer Selcuk / @sencers_

10/10/2013 at 03:45AM

26
#215 - James O Smith / @josmith4242

10/24/2013 at 01:34AM

26
#216 - Nathan / @NathanHarperoni

10/27/2013 at 03:13PM

26
#217 - Oskar Werkelin Ahlin / @osk_wa

12/04/2013 at 10:57PM

26
#218 - Andreas Källberg / @Anka213

01/16/2014 at 11:19PM

26
#219 - James Ed-Jo / @Jamedjo

01/29/2014 at 04:09AM

26
#220 - Patrick Oscity / @der_padde

02/09/2014 at 09:17PM

26
#221 - Joonas Pihlajamaa / @jokkebk

02/16/2014 at 09:22PM

26
#222 - Xelrifos / @Xelrifos

02/17/2014 at 03:11PM

26
#223 - フミ ハシ / @fumi_hs

02/20/2014 at 02:35PM

26
#224 - Matt Widmann / @mattwidmann

03/07/2014 at 08:02PM

26
#225 - RB / @powerage88

03/17/2014 at 11:52PM

26
#226 - TapTemplate / @TapTemplate

06/27/2014 at 01:56AM

26
#227 - Tim Vim / @vim_tim

07/01/2014 at 01:46PM

26
#228 - Daniel Burnett / @mango_cheetah

10/10/2014 at 05:12AM

26
#229 - Walker Boh / @walker_boh

10/01/2015 at 11:12AM

26
#230 - malet / @Malet

06/24/2016 at 10:22PM

26
#231 - Peter Strawson / @PeterStrawson

10/18/2016 at 03:10PM

26
#232 - Etienne Florent / @EtienneFlorent

11/23/2016 at 12:28PM

26
#233 - Patrick Sanan / @patricksanan

01/13/2017 at 01:53PM

26
#234 - Terry Ding / @TerryDing77

08/24/2017 at 12:02PM

26
#235 - Andrew Peterson / @FungalRaincloud

07/30/2018 at 02:20AM

26
#236 - 黒澤亮二 / @rjkuro

05/25/2019 at 06:22AM

27
#237 - Kai Yuan / @kentyuan

10/04/2013 at 04:07PM

27
#238 - Gemma Lynn / @ellotheth

10/22/2013 at 09:19PM

27
#239 - gary.klindt@googlema / @garstekli

11/10/2013 at 02:07PM

27
#240 - Will Handley / @falsewhenquined

11/24/2013 at 06:11PM