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

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

667 active golfers, 2152 entries

Solutions by @codegourmet:
11
#71 - codegourmet / @codegourmet

10/01/2013 at 12:41PM

12
#>244 - codegourmet / @codegourmet

10/01/2013 at 12:40PM

13
#>381 - codegourmet / @codegourmet

10/01/2013 at 12:39PM

14
#>471 - codegourmet / @codegourmet

10/01/2013 at 12:37PM

15
#>547 - codegourmet / @codegourmet

10/01/2013 at 12:36PM

16
#>600 - codegourmet / @codegourmet

10/01/2013 at 12:35PM

18
#>631 - codegourmet / @codegourmet

10/01/2013 at 12:32PM

19
#>639 - codegourmet / @codegourmet

10/01/2013 at 12:28PM

21
#>646 - codegourmet / @codegourmet

10/01/2013 at 12:27PM