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 630 remaining solutions by signing in and submitting your own entry
#631 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

631 active golfers, 3025 entries

Leaderboard (lowest score wins):
25
#211 - Andrew Leung / @aleungpivotal

12/22/2014 at 07:09PM

25
#212 - Blake Tereau / @BlakeTereau

08/13/2015 at 06:32PM

25
#213 - Pratap Koritala / @pratap_koritala

02/21/2016 at 05:41AM

25
#214 - Mathias Andersson / @Wraul

02/22/2016 at 08:20PM

25
#215 - tgmeng / @lazy_fabric

06/10/2016 at 05:02AM

25
#216 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 04:53AM

26
#217 - Oliver Christ / @0liverChrist

10/05/2013 at 03:29PM

26
#218 - Marcin Sza / @coot_

10/09/2013 at 06:59PM

26
#219 - Sencer Selcuk / @sencers_

10/10/2013 at 03:45AM

26
#220 - James O Smith / @josmith4242

10/24/2013 at 01:34AM

26
#221 - Nathan / @NathanHarperoni

10/27/2013 at 03:13PM

26
#222 - Oskar Werkelin Ahlin / @osk_wa

12/04/2013 at 10:57PM

26
#223 - Andreas Källberg / @Anka213

01/16/2014 at 11:19PM

26
#224 - James Ed-Jo / @Jamedjo

01/29/2014 at 04:09AM

26
#225 - Patrick Oscity / @der_padde

02/09/2014 at 09:17PM

26
#226 - Joonas Pihlajamaa / @jokkebk

02/16/2014 at 09:22PM

26
#227 - Xelrifos / @Xelrifos

02/17/2014 at 03:11PM

26
#228 - フミ ハシ / @fumi_hs

02/20/2014 at 02:35PM

26
#229 - Matt Widmann / @mattwidmann

03/07/2014 at 08:02PM

26
#230 - RB / @powerage88

03/17/2014 at 11:52PM

26
#231 - TapTemplate / @TapTemplate

06/27/2014 at 01:56AM

26
#232 - Tim Vim / @vim_tim

07/01/2014 at 01:46PM

26
#233 - Daniel Burnett / @mango_cheetah

10/10/2014 at 05:12AM

26
#234 - Walker Boh / @walker_boh

10/01/2015 at 11:12AM

26
#235 - malet / @Malet

06/24/2016 at 10:22PM

26
#236 - Peter Strawson / @PeterStrawson

10/18/2016 at 03:10PM

26
#237 - Etienne Florent / @EtienneFlorent

11/23/2016 at 12:28PM

26
#238 - Patrick Sanan / @patricksanan

01/13/2017 at 01:53PM

26
#239 - Terry Ding / @TerryDing77

08/24/2017 at 12:02PM

26
#240 - Andrew Peterson / @FungalRaincloud

07/30/2018 at 02:20AM