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 536cfa23fcccd100025678bd

Extract argument from function

The aim is to see if you can do some refactoring very fast.

Start file
attr("y",function(v){return v})
End file
f=function(v){return v};
attr("y",f)

View Diff

1c1,2
< attr("y",function(v){return v})
---
> f=function(v){return v};
> attr("y",f)

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 623 remaining solutions by signing in and submitting your own entry
#624 BitLad / @BitLad - Score: 30 - 01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>

0 comments


Created by: @EdgarHipp

624 active golfers, 1837 entries

Leaderboard (lowest score wins):
19
#571 - Austin Ware / @AustinWare17

03/12/2018 at 08:51PM

19
#572 - niwatoco / @yoshitune9

07/19/2018 at 07:50PM

19
#573 - Random / @Random29985999

11/29/2018 at 03:50PM

19
#574 - Graham Singer / @grahamsinger

01/05/2019 at 05:25AM

20
#575 - Joseph Tyler Jones / @josephtyler

05/12/2014 at 10:13PM

20
#576 - Jan Wedekind / @wedesoft

06/03/2014 at 09:46PM

20
#577 - Pablo Acuña R. / @pabloacunar

06/22/2014 at 11:46PM

20
#578 - Akshay Aurora / @akshayaurora

09/16/2014 at 07:40AM

20
#579 - Edmundo Perez / @ingedmundo

12/03/2014 at 07:13PM

20
#580 - Maxime / @Maxime_VII

06/23/2015 at 02:45PM

20
#581 - かりうむ / @ka1l

12/07/2015 at 04:09AM

20
#582 - Thijs van den Anker / @thijsvdanker

02/21/2016 at 08:37AM

20
#583 - Ryan van Rensburg / @rdvr001

07/21/2016 at 10:29AM

20
#584 - Kaydo Alders / @Yousousen

03/13/2018 at 05:26PM

20
#585 - Andrew Ouzts / @andrew_ouzts

07/22/2018 at 05:12AM

20
#586 - Benjamin Kiesl / @BenjaminKiesl

11/05/2018 at 01:57PM

21
#587 - 郭景維 / @wayne77551

06/01/2014 at 08:38AM

21
#588 - jiangchuan / @tommy_he

11/16/2014 at 07:47PM

21
#589 - Josh Weinstein / @j_weinstein

11/17/2014 at 10:18AM

21
#590 - Vincent Dumoulin / @dumoulinv

11/26/2014 at 02:58AM

21
#591 - air wick / @airwickc

01/23/2015 at 12:30AM

21
#592 - luffy / @raxcoi

06/09/2015 at 10:47AM

21
#593 - Stop and think / @ms_uncountable

07/06/2017 at 12:09PM

22
#594 - Jorge Garcia / @slash28cu

05/18/2014 at 10:10AM

22
#595 - Корнев Руслан / @woto7

06/15/2014 at 04:34PM

22
#596 - Max R / @brewtroin

06/22/2014 at 05:58PM

22
#597 - Wandering ponderer / @0proxycon

07/17/2014 at 01:08PM

22
#598 - Simon Mölzer / @h0wser

08/25/2014 at 03:19PM

22
#599 - Glauco Pires / @grpires

11/25/2014 at 12:31AM

22
#600 - Eric Biven / @EricBiven

01/01/2015 at 02:28AM