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

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

676 active golfers, 2188 entries

Solutions by @Arohanui:
11
#43 - Kate / @Arohanui

10/28/2012 at 04:01AM

11
#>53 - Kate / @Arohanui

05/04/2013 at 03:09AM

12
#>234 - Kate / @Arohanui

10/28/2012 at 04:00AM

12
#>239 - Kate / @Arohanui

05/04/2013 at 02:07AM

12
#>239 - Kate / @Arohanui

05/04/2013 at 03:00AM

12
#>239 - Kate / @Arohanui

05/04/2013 at 03:04AM

12
#>239 - Kate / @Arohanui

05/04/2013 at 03:07AM

12
#>239 - Kate / @Arohanui

05/04/2013 at 03:07AM

13
#>367 - Kate / @Arohanui

10/28/2012 at 03:53AM

13
#>370 - Kate / @Arohanui

05/04/2013 at 02:03AM

13
#>370 - Kate / @Arohanui

05/04/2013 at 02:04AM

14
#>462 - Kate / @Arohanui

10/28/2012 at 03:48AM

14
#>467 - Kate / @Arohanui

05/04/2013 at 02:00AM

15
#>552 - Kate / @Arohanui

05/04/2013 at 01:59AM

23
#>660 - Kate / @Arohanui

05/04/2013 at 01:56AM