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):
30
#331 - Michal Sylwester / @msylw

05/20/2016 at 04:53AM

30
#332 - Hans Yelek / @hans_yelek

01/11/2017 at 03:04AM

30
#333 - Daniel / @Daniel00288663

04/18/2017 at 11:11AM

30
#334 - yqu212 / @yqu212

07/27/2018 at 12:43PM

30
#335 - Joel Eriksson / @OwariDa

04/11/2019 at 01:51PM

31
#336 - Devin Gray / @devinagray

10/04/2013 at 02:12AM

31
#337 - Zenk Alia / @zenkalia

10/17/2013 at 01:07AM

31
#338 - yoohey / @yoohey_m

10/17/2013 at 03:30PM

31
#339 - cj / @cj01101

10/18/2013 at 10:05PM

31
#340 - Roger Bongers / @RogerBongers

10/23/2013 at 03:30AM

31
#341 - moo goo / @m00g000

10/30/2013 at 07:05PM

31
#342 - Ben Nak / @BbB8nNn

11/03/2013 at 06:05PM

31
#343 - Erez Shinan / @erezsh

11/05/2013 at 01:49PM

31
#344 - Daniel Marjenburgh / @dmarjenburgh

11/19/2013 at 09:33AM

31
#345 - Tosoa Bacca / @elsifaka

11/21/2013 at 08:35AM

31
#346 - Alex Rutkowski / @alexmarie84

12/04/2013 at 10:31PM

31
#347 - Guy Rozen / @HolyEggplant

12/17/2013 at 01:56PM

31
#348 - fifigyuri / @fifigyuri

12/17/2013 at 03:57PM

31
#349 - Almog / @almog

12/17/2013 at 10:10PM

31
#350 - joe smoe / @joesmoevim

12/20/2013 at 11:27PM

31
#351 - ont / @ontrif

12/28/2013 at 03:29PM

31
#352 - Rodrigo Campos G. / @rodri_gore

01/03/2014 at 03:34AM

31
#353 - Sven Hedin / @HedinR7

01/11/2014 at 01:31PM

31
#354 - William Fligor / @williamfligor

01/28/2014 at 06:07PM

31
#355 - Arsenic Hall / @FoxLisk

01/28/2014 at 09:41PM

31
#356 - Christoph / @crrauch

01/29/2014 at 11:21AM

31
#357 - Joshua Tacoma / @yellowseed

02/02/2014 at 03:31PM

31
#358 - freestlr / @freestlr

02/03/2014 at 08:50AM

31
#359 - Oddbike / @oddbike

02/04/2014 at 09:46PM

31
#360 - Marchand Paul-Valère / @pvmarch

02/25/2014 at 04:22PM