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 546a627195f6da000265742d

Pretty format for variable declarations

Project standards demand the equal signs must be aligned for better readability.

Start file
var parser = require('../src/grammar.js'),
    src = require('../src/blueberry.js'),
    fs = require('fs'),
    glob = require('glob');
End file
var parser = require('../src/grammar.js'),
    src    = require('../src/blueberry.js'),
    fs     = require('fs'),
    glob   = require('glob');

View Diff

2,4c2,4
<     src = require('../src/blueberry.js'),
<     fs = require('fs'),
<     glob = require('glob');
\ No newline at end of file
---
>     src    = require('../src/blueberry.js'),
>     fs     = require('fs'),
>     glob   = require('glob');
\ No newline at end of file

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 40 remaining solutions by signing in and submitting your own entry
#41 Gurukandhamoorthi / Gurukandhamoor1 - Score: 19 - 08/24/17 @ 15:57
qqf=5i <Esc>d11|<CR>q3@qZZ

0 comments

#42 Ben Hill / KaizenSoze70 - Score: 19 - 09/26/17 @ 18:08
2/=<CR>i <Esc>2.nn4.nn2.ZZ

0 comments

#43 Jack Z / itszhou - Score: 20 - 06/28/15 @ 20:48
jE3a <Esc>+E4a <Esc>+Ea  <Esc>ZZ

0 comments

#44 luffy / raxcoi - Score: 21 - 06/13/15 @ 15:15
qqf=9i <Esc>12|dwj0q3@qZZ

0 comments

#45 Jan Novak / odpadnimail - Score: 22 - 11/18/14 @ 21:48
/=<CR>n3i <Esc>nn4i <Esc>nn.xhxZZ

0 comments

#46 Alex Bartol / alexbartol - Score: 22 - 05/06/15 @ 06:06
jf=3i <Esc>jF=4i <Esc>jh2i <Esc>ZZ

0 comments

#47 ltn614 / ltn614 - Score: 23 - 09/24/15 @ 06:37
+wi   <Esc>+wi    <Esc>+wi  <Esc>ZZ

0 comments

#48 Edmundo Perez / ingedmundo - Score: 26 - 12/04/14 @ 17:32
j2wi   <Esc>j2bi    <Esc>jhi  <Esc>:x<CR>

0 comments

#49 Lieven Keersmaekers / LievenKeersmaek - Score: 28 - 11/18/14 @ 18:41
:se ve=all|%norm f=d$11|p<CR>ZZ

zulolosi: Nice ! but with normal there is a 18 keystrokes solution --> :%no<tab>!f=X7Pd11|ZZ

udioica: @zulolosi: Use 2w instead of !f=

zulolosi: Nice ! with 2w change, is a 17 "normal" solution ! Thanks !

3 comments

#50 LSMTD / LSMTD - Score: 31 - 12/09/14 @ 03:33
jf=i   j<BS><Esc>jbbi     <BS><Esc>jBi  <Esc>:wq<CR>

0 comments

Created by: gosukiwi

50 active golfers, 121 entries

Leaderboard (lowest score wins):
14
#1 - Petro Тrouq / zulolosi

11/17/2014 at 09:26PM

14
#2 - Urtica dioica / udioica

11/17/2014 at 09:41PM

14
#3 - Hans Liu / zhansliu

11/17/2014 at 10:42PM

14
#4 - Eduardo / earada

11/18/2014 at 09:46AM

14
#5 - John Braxler / braxler

11/18/2014 at 02:48PM

14
#6 - shein / skriyka

11/18/2014 at 11:00PM

14
#7 - Jakob / jajob

11/21/2014 at 07:38AM

14
#8 - Carlos López / morrizon

11/28/2014 at 09:40AM

14
#9 - Dane Summers / dsummersl

11/29/2014 at 03:38AM

14
#10 - Ivan Brennan / ivanbrennan

11/29/2014 at 09:49PM

14
#11 - John Diamond / jcdmnd

12/07/2014 at 03:58PM

14
#12 - Carlos A Henríquez Q / lagunex

01/17/2015 at 06:54PM

14
#13 - Jake Eskel / JakeEskel

01/27/2015 at 03:36PM

14
#14 - Walker Boh / walker_boh

11/04/2015 at 01:06PM

14
#15 - Jon Krause / jkrause314

01/14/2016 at 05:50PM

14
#16 - Daniel / Daniel00288663

04/06/2017 at 03:10PM

15
#17 - w1zeman1p / wizemanip

11/18/2014 at 04:55PM

15
#18 - Matt Robbins / mcrmfc

11/19/2014 at 06:42AM

15
#19 -  River / glacialrd

11/21/2014 at 08:30AM

15
#20 - Glauco Pires / grpires

11/24/2014 at 11:56PM

15
#21 - kobby / _kafdot_

12/14/2014 at 11:39PM

15
#22 - Matthieu Crapet / mcr05

02/27/2015 at 01:17PM

15
#23 - xieyh11 / xieyh11

02/28/2015 at 09:14AM

15
#24 - pftb12345 / pftb12345

04/30/2015 at 04:46AM

16
#25 - Kai Yuan / kentyuan

11/17/2014 at 10:17PM

16
#26 - mnx / mnxx

11/20/2014 at 11:41AM

16
#27 - Test User / TestUserIgnore

12/04/2014 at 10:14PM

16
#28 - mark0829 / mark0829

02/02/2015 at 01:01PM

17
#29 - James / Dronak

11/17/2014 at 11:43PM

17
#30 - Zapata / Incredible_JFP

12/02/2014 at 09:57AM

17
#31 - Oliver Christ / 0liverChrist

02/08/2015 at 09:10PM

17
#32 - Andrew Michaud / andrewjmichaud

09/04/2015 at 08:51AM

18
#33 - Steve Tjoa / stevetjoa

11/17/2014 at 10:14PM

18
#34 - tacke / tacke_jp

11/22/2014 at 05:30AM

18
#35 - Keyboard Fire / KeyboardFire

11/22/2014 at 01:46PM

18
#36 - Mattiassich Ákos / mattiassicha

12/01/2014 at 05:37PM

18
#37 - Rao Zvorovski / RaoZvorovski

12/06/2014 at 07:10PM

18
#38 - Linda Liu / _lindaliu_

02/20/2015 at 03:18AM

18
#39 - Dmitry Zudochkin / vredniy

02/20/2015 at 11:40AM

19
#40 - Lachlan Easton / LBEaston

11/18/2014 at 02:53PM

19
#41 - Gurukandhamoorthi / Gurukandhamoor1

08/24/2017 at 03:57PM

19
#42 - Ben Hill / KaizenSoze70

09/26/2017 at 06:08PM

20
#43 - Jack Z / itszhou

06/28/2015 at 08:48PM

21
#44 - luffy / raxcoi

06/13/2015 at 03:15PM

22
#45 - Jan Novak / odpadnimail

11/18/2014 at 09:48PM

22
#46 - Alex Bartol / alexbartol

05/06/2015 at 06:06AM

23
#47 - ltn614 / ltn614

09/24/2015 at 06:37AM

26
#48 - Edmundo Perez / ingedmundo

12/04/2014 at 05:32PM

28
#49 - Lieven Keersmaekers / LievenKeersmaek

11/18/2014 at 06:41PM

31
#50 - LSMTD / LSMTD

12/09/2014 at 03:33AM