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):
37
#541 - Dmitry Teslenko / @krab_mozga

04/02/2014 at 08:53AM

37
#542 - Nic West / @west_nic

04/06/2014 at 03:04PM

37
#543 - Deepak Surti / @dmsurti

03/16/2015 at 02:48PM

37
#544 - Xiaocan Li / @XiaocanLi

02/29/2016 at 11:49PM

37
#545 - Robin De Mol / @RobinDeMol

09/14/2018 at 10:03AM

37
#546 - Gitsnik / @dracyrys

04/26/2019 at 11:58AM

38
#547 - Balthamos / @balthamos89

11/02/2013 at 01:44AM

38
#548 - Yoshiaki Sato / @yoshiakist

12/10/2013 at 02:05PM

38
#549 - Ian Laird / @irlaird

12/16/2013 at 10:25PM

38
#550 - Michael Bitzi / @mibitzi

02/14/2014 at 05:40PM

38
#551 - apollolune / @apollolune

04/12/2015 at 12:37AM

38
#552 - Geoff / @RealGeoffErwin

10/09/2017 at 06:35PM

38
#553 - Performa / @performa6400

12/10/2018 at 04:30PM

39
#554 - Chris Davison / @davisonnn

05/24/2014 at 11:33PM

39
#555 - Andrew Larson / @applarson

04/15/2015 at 02:06PM

39
#556 - Roger / @enjoyheyo

10/23/2015 at 08:47PM

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

01/31/2014 at 12:53PM

41
#558 - Min Ma / @Miss0506

10/21/2013 at 02:34AM

41
#559 - s3vster / @s3vster

10/26/2013 at 06:25PM

41
#560 - jmlucjav / @jmlucjav

11/12/2013 at 04:16PM

41
#561 - Benjamin Glassman / @squizztoupe

01/19/2014 at 10:09PM

41
#562 - Drew DeVault / @sircmpwn

01/28/2014 at 07:24PM

41
#563 - Nipunn Koorapati / @nipunn1313

02/01/2014 at 10:28PM

41
#564 - Hendrik Lammers / @hendriklammers

06/12/2014 at 10:06PM

41
#565 - Daniel Allen Deutsch / @cmmn_nighthawk

04/04/2015 at 09:41PM

41
#566 - Fabio Branquinho / @branquif

11/08/2018 at 10:23PM

41
#567 - TimMcGuire / @mcguire

01/08/2019 at 04:55PM

42
#568 - John Hilts / @johnhilts

02/04/2014 at 07:11AM

42
#569 - kungfuchad / @kungfuchad

10/28/2014 at 11:18AM

42
#570 - John Oleksowicz / @JohnOlek

10/09/2018 at 08:43PM