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 @adamgbell:

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

663 active golfers, 2139 entries

Solutions by @adamgbell:
11
#53 - Adam Bell / @adamgbell

03/26/2013 at 05:25PM

12
#>234 - Adam Bell / @adamgbell

03/26/2013 at 05:18PM

13
#>363 - Adam Bell / @adamgbell

03/26/2013 at 05:13PM

13
#>363 - Adam Bell / @adamgbell

03/26/2013 at 05:23PM

14
#>458 - Adam Bell / @adamgbell

03/26/2013 at 05:02PM

14
#>458 - Adam Bell / @adamgbell

03/26/2013 at 05:03PM

14
#>458 - Adam Bell / @adamgbell

03/26/2013 at 05:11PM

14
#>458 - Adam Bell / @adamgbell

03/26/2013 at 05:12PM

15
#>542 - Adam Bell / @adamgbell

03/26/2013 at 05:01PM

15
#>542 - Adam Bell / @adamgbell

03/26/2013 at 05:04PM

15
#>542 - Adam Bell / @adamgbell

03/26/2013 at 05:08PM

16
#>593 - Adam Bell / @adamgbell

03/26/2013 at 04:53PM

16
#>593 - Adam Bell / @adamgbell

03/26/2013 at 04:57PM

16
#>593 - Adam Bell / @adamgbell

03/26/2013 at 05:10PM

22
#>645 - Adam Bell / @adamgbell

03/26/2013 at 04:53PM