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):
19
#151 - alekfed / @alek_fed

04/15/2019 at 09:16AM

19
#152 - Grant / @grant_7788

04/30/2019 at 01:55PM

19
#153 - Sherab Giovannini / @shaddycls

05/18/2019 at 11:48PM

20
#154 - StarkHalo / @hellektor

10/06/2013 at 05:18AM

20
#155 - Jan Bundesmann / @janbundesmann

03/17/2016 at 02:23PM

20
#156 - Mihai / @mihaicristiant

12/03/2018 at 06:23PM

20
#157 - 默罕默德 / @Rt6RjEAJ987Woes

02/18/2019 at 11:52AM

20
#158 - 田中太郎 / @hidecham55

05/17/2019 at 04:40AM

21
#159 - retired account / @retired10072015

10/05/2013 at 06:09PM

21
#160 - aRkadeFR / @aRkadeFR

10/06/2013 at 07:13PM

21
#161 - Tzipan / @Tzipan

10/23/2013 at 07:55PM

21
#162 - Ruy Diaz / @diazruy

11/06/2013 at 01:41AM

21
#163 - JamesT / @jamestrinklein

01/29/2014 at 07:15AM

21
#164 - Strabs / @artistavenue

02/03/2014 at 03:13PM

21
#165 - Jean-PhilippeBurelle / @jpburelle

02/28/2014 at 03:37AM

21
#166 - xieyh11 / @xieyh11

02/16/2015 at 03:31AM

21
#167 - Hao Deng / @haodeng

06/15/2015 at 12:21PM

21
#168 - Robert Robertson / @RobertC3228687

06/15/2015 at 07:41PM

21
#169 - Peter B / @l0wm4x

08/09/2015 at 09:43PM

21
#170 - LC / @leeren

08/22/2015 at 11:32PM

21
#171 - DespicableJerk / @JerkDespicable

10/20/2015 at 03:45PM

21
#172 - retro / @tryphopp

01/15/2016 at 06:06PM

21
#173 - Gabriel Tailor / @gabriel_tailor

06/24/2016 at 04:09AM

21
#174 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 06:02PM

21
#175 - Davis Fields / @i301585

11/05/2016 at 05:27AM

21
#176 - しぇぱっち / @shepabashi

10/23/2017 at 06:34AM

21
#177 - Arijus / @argshook

02/07/2018 at 09:32AM

21
#178 - Lisa Ugray / @lisa_ugray

03/16/2018 at 01:19PM

21
#179 - Francesco Sacchi / @depsir

08/01/2018 at 08:52PM

22
#180 - Sergio Benitez / @Sergio965

10/09/2013 at 09:27PM