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

631 active golfers, 3025 entries

Leaderboard (lowest score wins):
36
#541 - Teemu Okkonen / @TeemuOkkonen

07/08/2015 at 09:07PM

36
#542 - Léo S / @LeoSauvaget

08/29/2015 at 08:52AM

36
#543 - Wilmer Bandres / @WilmerBandres

12/05/2015 at 07:28PM

36
#544 - Roberto Carraretto / @robcarraretto

01/23/2016 at 02:08PM

36
#545 - Constantine / @ConstantineHatz

09/22/2016 at 06:23PM

37
#546 - LumberCoder / @LuRsT

01/28/2014 at 06:19PM

37
#547 - Jacob / @jayekub

03/23/2014 at 12:27AM

37
#548 - Dmitry Teslenko / @krab_mozga

04/02/2014 at 08:53AM

37
#549 - Nic West / @west_nic

04/06/2014 at 03:04PM

37
#550 - Deepak Surti / @dmsurti

03/16/2015 at 02:48PM

37
#551 - Xiaocan Li / @XiaocanLi

02/29/2016 at 11:49PM

37
#552 - Robin De Mol / @RobinDeMol

09/14/2018 at 10:03AM

37
#553 - Gitsnik / @dracyrys

04/26/2019 at 11:58AM

38
#554 - Balthamos / @balthamos89

11/02/2013 at 01:44AM

38
#555 - Yoshiaki Sato / @yoshiakist

12/10/2013 at 02:05PM

38
#556 - Ian Laird / @irlaird

12/16/2013 at 10:25PM

38
#557 - Michael Bitzi / @mibitzi

02/14/2014 at 05:40PM

38
#558 - apollolune / @apollolune

04/12/2015 at 12:37AM

38
#559 - Geoff / @RealGeoffErwin

10/09/2017 at 06:35PM

38
#560 - Performa / @performa6400

12/10/2018 at 04:30PM

39
#561 - Chris Davison / @davisonnn

05/24/2014 at 11:33PM

39
#562 - Andrew Larson / @applarson

04/15/2015 at 02:06PM

39
#563 - Roger / @enjoyheyo

10/23/2015 at 08:47PM

40
#564 - Aurélien Vallée / @aurelienvallee

01/31/2014 at 12:53PM

41
#565 - Min Ma / @Miss0506

10/21/2013 at 02:34AM

41
#566 - s3vster / @s3vster

10/26/2013 at 06:25PM

41
#567 - jmlucjav / @jmlucjav

11/12/2013 at 04:16PM

41
#568 - Benjamin Glassman / @squizztoupe

01/19/2014 at 10:09PM

41
#569 - Drew DeVault / @sircmpwn

01/28/2014 at 07:24PM

41
#570 - Nipunn Koorapati / @nipunn1313

02/01/2014 at 10:28PM