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 4fcccb70024f950001000026

Switch function arguments

How to switch two arguments of a function.

Start file
function testFunction (foo, bar) {
}
End file
function testFunction (bar, foo) {
}

View Diff

1c1
< function testFunction (foo, bar) {
---
> function testFunction (bar, foo) {

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 605 remaining solutions by signing in and submitting your own entry
#606 🎱 Josh Branchaud 🔥 / @jbrancha - Score: 63 - 08/24/16 @ 01:02
:s<BS><BS>ffvi(:s/\w{3}, <BS><BS><BS><BS><BS><BS>(\w*\), \w<BS>(\w*\)\\2, <BS><BS><BS><BS><BS>/\2, \1/<CR>ZZ

0 comments


Created by: @Ajnasz

606 active golfers, 1888 entries

Leaderboard (lowest score wins):
14
#391 - buz / @buzbone

06/15/2012 at 01:25AM

14
#392 - Nimlar / @Nimlar

06/15/2012 at 08:50AM

14
#393 - Carl Furrow / @carl_furrow

06/22/2012 at 06:12PM

14
#394 - Joe McCall / @joem86

07/02/2012 at 09:57PM

14
#395 - Marco / @xmarkoz

07/04/2012 at 06:13PM

14
#396 - Eric Mathison / @ericmathison

07/13/2012 at 07:38AM

14
#397 - Steve Burdick / @kairu0

07/22/2012 at 06:18AM

14
#398 - Caleb McDaniel / @wcaleb

07/25/2012 at 06:36PM

14
#399 - Dan Oneata / @DanOneata

08/04/2012 at 09:38AM

14
#400 - Jacob Taylor / @jacobltaylor

08/05/2012 at 02:41AM

14
#401 - Björn Holdt / @bholdt

08/10/2012 at 07:19PM

14
#402 - Michael Limiero / @michaellimiero

08/13/2012 at 11:54PM

14
#403 - Brian Chen / @betaveros

08/21/2012 at 08:43AM

14
#404 - Viswanath Sivakumar / @viswanathgs

08/30/2012 at 06:31PM

14
#405 - Rohith Ravi / @entombedvirus

08/30/2012 at 11:25PM

14
#406 - jakeroberts / @jakeroberts

09/07/2012 at 06:50AM

14
#407 - Andrew Honig / @AndyKHonig

09/09/2012 at 03:03AM

14
#408 - Miguel Sánchez / @miguelsr1987

10/02/2012 at 11:50AM

14
#409 - Leigh Bicknell / @LeighBicknell

10/09/2012 at 11:58AM

14
#410 - Zbigniew Siciarz / @zsiciarz

11/18/2012 at 08:27PM

14
#411 - Claudio Ortolina / @cloud8421

11/27/2012 at 08:02PM

14
#412 - nicolas bo / @thevegeta

12/06/2012 at 10:10AM

14
#413 - Tyler / @tylerbindon

04/02/2013 at 07:20AM

14
#414 - Jean Benoit / @jeanbenoit123

04/27/2013 at 01:13PM

14
#415 - Clinton シ / @iblamefish

05/11/2013 at 01:16PM

14
#416 - Joe Sullivan / @itsjoesullivan

06/19/2013 at 06:31AM

14
#417 - Justin Le / @mstk

07/24/2013 at 07:59AM

14
#418 - Bart of Denver / @bartofdenver

08/12/2013 at 02:08PM

14
#419 - Alexander / @usr_noid

08/22/2013 at 07:22AM

14
#420 - Luis Visintini / @lvisintini

08/27/2013 at 07:27PM