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

638 active golfers, 3072 entries

Leaderboard (lowest score wins):
21
#181 - DespicableJerk / @JerkDespicable

10/20/2015 at 03:45PM

21
#182 - retro / @tryphopp

01/15/2016 at 06:06PM

21
#183 - Gabriel Tailor / @gabriel_tailor

06/24/2016 at 04:09AM

21
#184 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 06:02PM

21
#185 - Davis Fields / @i301585

11/05/2016 at 05:27AM

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

10/23/2017 at 06:34AM

21
#187 - Arijus / @argshook

02/07/2018 at 09:32AM

21
#188 - Lisa Ugray / @lisa_ugray

03/16/2018 at 01:19PM

21
#189 - Francesco Sacchi / @depsir

08/01/2018 at 08:52PM

22
#190 - Sergio Benitez / @Sergio965

10/09/2013 at 09:27PM

22
#191 - Dimitar Dimitrov / @kurkale6ka

10/17/2013 at 02:23PM

22
#192 - John Phelan / @jackphel

02/02/2014 at 06:05PM

22
#193 - Steffen Siering / @ursobln

06/03/2014 at 12:03AM

22
#194 - bXpjE4GzUfnPTRHes1mI / @5DQzMDKJs2VoVt

06/26/2014 at 02:22PM

22
#195 - PLS / @jaegd

08/07/2014 at 01:22AM

22
#196 - Ram Tamtam / @ramtamtamtam

06/22/2016 at 02:30PM

22
#197 - Martin Tõnusoo / @martintonusoo

08/28/2016 at 10:31PM

22
#198 - Chris Robertson / @chrisxrobertson

05/05/2017 at 12:07PM

22
#199 - Guirec CORBEL / @GuirecCorbel

03/08/2018 at 01:17PM

23
#200 - Mac Heller-Ogden / @twosoul

11/23/2013 at 05:03PM

23
#201 - TerribleTrioJoe / @terribletriojoe

01/29/2014 at 10:49PM

23
#202 - Pierre Laporte / @pingtimeout

03/15/2014 at 10:33PM

23
#203 - Nam Net / @tafopigibi

11/29/2015 at 08:18AM

23
#204 - Ben Hill / @KaizenSoze70

05/22/2016 at 02:55PM

23
#205 - Luke Bryant / @LukeBryant55

10/07/2017 at 03:05PM

24
#206 - bunnies president / @bunnies4p

10/22/2013 at 03:16PM

24
#207 - Bradley M. Small / @BradleySmall

10/27/2013 at 01:40AM

24
#208 - Test User / @TestUserIgnore

12/04/2014 at 10:35PM

24
#209 - John Clara / @johnanthclara

08/21/2015 at 05:13AM

25
#210 - david ta / @tadavid

11/21/2013 at 08:11PM