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

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

661 active golfers, 2130 entries

Solutions by @hannesr:
11
#89 - Hannes Remahl / @hannesr

02/28/2014 at 11:39AM

12
#>255 - Hannes Remahl / @hannesr

02/28/2014 at 11:38AM

13
#>390 - Hannes Remahl / @hannesr

02/28/2014 at 11:36AM

14
#>472 - Hannes Remahl / @hannesr

02/28/2014 at 11:35AM

15
#>553 - Hannes Remahl / @hannesr

02/28/2014 at 11:34AM

16
#>598 - Hannes Remahl / @hannesr

02/28/2014 at 11:33AM