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

676 active golfers, 2019 entries

Leaderboard (lowest score wins):
18
#571 - Benjamin Williams / @benjaminjosephw

05/09/2014 at 04:24PM

18
#572 - Łukasz Makuch / @zopsesen

05/18/2014 at 03:47PM

18
#573 - debris / @iDebris5

05/18/2014 at 03:51PM

18
#574 - tobeportable / @tobeportable

05/22/2014 at 02:52PM

18
#575 - Ilya Strukov / @i1ey

05/23/2014 at 11:42AM

18
#576 - TimWolla / @TimWolla

06/02/2014 at 11:06PM

18
#577 - Nelson Senna / @nelson_senna

06/03/2014 at 03:21PM

18
#578 - Mayor Guelph / @RogerGuelph

06/11/2014 at 02:03AM

18
#579 - Martijn Theunissen / @Damnesia__

06/12/2014 at 11:37PM

18
#580 - uncleringo / @uncleringo

07/02/2014 at 08:34AM

18
#581 - madka / @lachrimae_pavan

08/03/2014 at 04:36PM

18
#582 - Adrian Bradd / @keepab

09/01/2014 at 12:16AM

18
#583 - Dario Avitabile / @tutticapaci

09/01/2014 at 01:30PM

18
#584 - Deepak Surti / @dmsurti

03/16/2015 at 02:38PM

18
#585 - Akash Bhardwaj / @akashbdj

03/25/2015 at 01:56PM

18
#586 - Ryan Marcotte / @ryanjmarcotte

11/13/2015 at 01:57AM

18
#587 - TaoChen / @632143592Tao

06/21/2016 at 09:56AM

18
#588 - sijinyuan / @sijinyuan

02/22/2017 at 02:17AM

18
#589 - C / @bravekarma

10/15/2017 at 07:37AM

18
#590 - Ron Alexssen / @Ralexhere

11/01/2017 at 07:52PM

18
#591 - phucvin / @phucvin

02/14/2018 at 04:54PM

18
#592 - z0c / @zerocabal

06/11/2018 at 01:32PM

18
#593 - Phil Devitt / @GeneralHav0k

01/02/2019 at 10:35PM

18
#594 - Cameron Fowler / @camfowler

03/19/2019 at 03:01AM

18
#595 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 09:20PM

19
#596 - Chris Davison / @davisonnn

05/24/2014 at 11:16PM

19
#597 - Masha Rikhter / @mrikhter

07/09/2014 at 10:50PM

19
#598 - JonathanStarnes / @JON_STARNES

08/08/2014 at 02:35AM

19
#599 - Siddhartha R Thota / @tweetingsid

08/11/2014 at 10:41AM

19
#600 - Roy Vim / @RoyVim

09/24/2014 at 10:22PM