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):
26
#241 - 黒澤亮二 / @rjkuro

05/25/2019 at 06:22AM

26
#242 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 06:55PM

27
#243 - Kai Yuan / @kentyuan

10/04/2013 at 04:07PM

27
#244 - Gemma Lynn / @ellotheth

10/22/2013 at 09:19PM

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

11/10/2013 at 02:07PM

27
#246 - Will Handley / @falsewhenquined

11/24/2013 at 06:11PM

27
#247 - John / @BerlinSchneider

01/14/2014 at 07:46AM

27
#248 - James Emerton / @ephelon

01/30/2014 at 12:28AM

27
#249 - Zudov / @zudov_me

02/03/2014 at 07:22AM

27
#250 - Colin Schmidt / @cfszero

02/05/2014 at 07:06PM

27
#251 - Chaitanya Desu / @ChaituNu

05/04/2014 at 05:34AM

27
#252 - Slartibartfast / @S_Bartfast

08/05/2014 at 08:40AM

27
#253 - Aaron Whittington / @whittaaron

01/16/2015 at 02:43AM

27
#254 - Garrett Smith / @garrettwhsmith

03/31/2015 at 12:21AM

27
#255 - abhinavgujjar / @abhinavgujjar

04/18/2016 at 06:20PM

27
#256 - setNull / @dadaojiemo

02/16/2017 at 03:11PM

27
#257 - DatBoi / @DatBoi42585694

04/24/2017 at 07:23PM

27
#258 - eric huang / @EricGodhand4826

05/05/2019 at 09:12AM

27
#259 - ささ / @nick11033

05/16/2019 at 11:34AM

27
#260 - Alex Yu / @sixianyu

06/10/2019 at 07:26AM

27
#261 - Christopher Currens / @chriscurrens

07/29/2019 at 02:34PM

28
#262 - Thameera Senanayaka / @thameera

10/04/2013 at 06:28AM

28
#263 - Steven Mueller / @Gervigok

10/06/2013 at 11:46PM

28
#264 - Grégoire Delattre / @gregdel

10/07/2013 at 08:18AM

28
#265 - I / @ForgetIt17

10/22/2013 at 03:15PM

28
#266 - まっすー。 / @trapple

10/31/2013 at 02:42AM

28
#267 - Zifei Tong / @chevalun

12/06/2013 at 11:06AM

28
#268 - Kent Frazier / @mindredefined

12/07/2013 at 05:39AM

28
#269 - digitalronin / @digitalronin

12/07/2013 at 02:46PM

28
#270 - Alessandro Lisander / @wuiimu

01/04/2014 at 06:13PM