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

652 active golfers, 2082 entries

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

10/01/2013 at 12:41PM

12
#>238 - codegourmet / @codegourmet

10/01/2013 at 12:40PM

13
#>369 - codegourmet / @codegourmet

10/01/2013 at 12:39PM

14
#>459 - codegourmet / @codegourmet

10/01/2013 at 12:37PM

15
#>535 - codegourmet / @codegourmet

10/01/2013 at 12:36PM

16
#>587 - codegourmet / @codegourmet

10/01/2013 at 12:35PM

18
#>617 - codegourmet / @codegourmet

10/01/2013 at 12:32PM

19
#>625 - codegourmet / @codegourmet

10/01/2013 at 12:28PM

21
#>632 - codegourmet / @codegourmet

10/01/2013 at 12:27PM