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):
27
#241 - John / @BerlinSchneider

01/14/2014 at 07:46AM

27
#242 - James Emerton / @ephelon

01/30/2014 at 12:28AM

27
#243 - Zudov / @zudov_me

02/03/2014 at 07:22AM

27
#244 - Colin Schmidt / @cfszero

02/05/2014 at 07:06PM

27
#245 - Chaitanya Desu / @ChaituNu

05/04/2014 at 05:34AM

27
#246 - Slartibartfast / @S_Bartfast

08/05/2014 at 08:40AM

27
#247 - Aaron Whittington / @whittaaron

01/16/2015 at 02:43AM

27
#248 - Garrett Smith / @garrettwhsmith

03/31/2015 at 12:21AM

27
#249 - abhinavgujjar / @abhinavgujjar

04/18/2016 at 06:20PM

27
#250 - setNull / @dadaojiemo

02/16/2017 at 03:11PM

27
#251 - DatBoi / @DatBoi42585694

04/24/2017 at 07:23PM

27
#252 - eric huang / @EricGodhand4826

05/05/2019 at 09:12AM

27
#253 - ささ / @nick11033

05/16/2019 at 11:34AM

27
#254 - Alex Yu / @sixianyu

06/10/2019 at 07:26AM

28
#255 - Thameera Senanayaka / @thameera

10/04/2013 at 06:28AM

28
#256 - Steven Mueller / @Gervigok

10/06/2013 at 11:46PM

28
#257 - Grégoire Delattre / @gregdel

10/07/2013 at 08:18AM

28
#258 - I / @ForgetIt17

10/22/2013 at 03:15PM

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

10/31/2013 at 02:42AM

28
#260 - Zifei Tong / @chevalun

12/06/2013 at 11:06AM

28
#261 - Kent Frazier / @mindredefined

12/07/2013 at 05:39AM

28
#262 - digitalronin / @digitalronin

12/07/2013 at 02:46PM

28
#263 - Alessandro Lisander / @wuiimu

01/04/2014 at 06:13PM

28
#264 - mattsalacain / @mattsalacain

01/30/2014 at 09:16PM

28
#265 - Yongho / @YONG_HO

02/04/2014 at 01:51AM

28
#266 - Trader / @bolatrade

02/13/2014 at 09:36PM

28
#267 - Lucius L. Hilley III / @unkmar

02/27/2014 at 08:38AM

28
#268 - brett / @brettyukich

03/23/2014 at 06:43PM

28
#269 - ところたん / @tokoro10g

04/06/2014 at 01:29PM

28
#270 - zmo / @guyzmo

05/08/2014 at 12:13PM