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):
36
#541 - TrentonZero / @TrentonZero

10/26/2013 at 12:40PM

36
#542 - Piotr G. / @gbdlin

12/03/2013 at 08:56PM

36
#543 - Pedro B. Coronel / @pbcoronel

01/28/2014 at 05:18PM

36
#544 - Tim Suchanek / @TimSuchanek

02/09/2014 at 09:23PM

36
#545 - jolka / @jolka19296078

05/22/2014 at 03:10PM

36
#546 - Paul Rodgers / @oursjaune

07/13/2014 at 02:45PM

36
#547 - 親の金でシャンプーを買うな / @jajkeqos

04/08/2015 at 04:28PM

36
#548 - Teemu Okkonen / @TeemuOkkonen

07/08/2015 at 09:07PM

36
#549 - Léo S / @LeoSauvaget

08/29/2015 at 08:52AM

36
#550 - Wilmer Bandres / @WilmerBandres

12/05/2015 at 07:28PM

36
#551 - Roberto Carraretto / @robcarraretto

01/23/2016 at 02:08PM

36
#552 - Constantine / @ConstantineHatz

09/22/2016 at 06:23PM

37
#553 - LumberCoder / @LuRsT

01/28/2014 at 06:19PM

37
#554 - Jacob / @jayekub

03/23/2014 at 12:27AM

37
#555 - Dmitry Teslenko / @krab_mozga

04/02/2014 at 08:53AM

37
#556 - Nic West / @west_nic

04/06/2014 at 03:04PM

37
#557 - Deepak Surti / @dmsurti

03/16/2015 at 02:48PM

37
#558 - Xiaocan Li / @XiaocanLi

02/29/2016 at 11:49PM

37
#559 - Robin De Mol / @RobinDeMol

09/14/2018 at 10:03AM

37
#560 - Gitsnik / @dracyrys

04/26/2019 at 11:58AM

38
#561 - Balthamos / @balthamos89

11/02/2013 at 01:44AM

38
#562 - Yoshiaki Sato / @yoshiakist

12/10/2013 at 02:05PM

38
#563 - Ian Laird / @irlaird

12/16/2013 at 10:25PM

38
#564 - Michael Bitzi / @mibitzi

02/14/2014 at 05:40PM

38
#565 - apollolune / @apollolune

04/12/2015 at 12:37AM

38
#566 - Geoff / @RealGeoffErwin

10/09/2017 at 06:35PM

38
#567 - Performa / @performa6400

12/10/2018 at 04:30PM

39
#568 - Chris Davison / @davisonnn

05/24/2014 at 11:33PM

39
#569 - Andrew Larson / @applarson

04/15/2015 at 02:06PM

39
#570 - Roger / @enjoyheyo

10/23/2015 at 08:47PM