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 by @JustinNBeaudry:

Unlock 17 remaining solutions by signing in and submitting your own entry
Created by: @Ajnasz

678 active golfers, 2195 entries

Solutions by @JustinNBeaudry:
13
#405 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:32PM

14
#>487 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:15PM

14
#>487 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:20PM

14
#>487 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:30PM

14
#>487 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:45PM

15
#>572 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:49PM

15
#>572 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:03PM

15
#>572 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:04PM

15
#>572 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 09:04PM

16
#>617 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:23PM

16
#>617 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:25PM

17
#>635 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:39PM

19
#>652 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:22PM

20
#>655 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:11PM

20
#>655 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:16PM

20
#>655 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:48PM

23
#>662 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 07:08PM