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

652 active golfers, 2082 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
#>225 - Kate / @Arohanui

10/28/2012 at 04:00AM

12
#>230 - Kate / @Arohanui

05/04/2013 at 02:07AM

12
#>230 - Kate / @Arohanui

05/04/2013 at 03:00AM

12
#>230 - Kate / @Arohanui

05/04/2013 at 03:04AM

12
#>230 - Kate / @Arohanui

05/04/2013 at 03:07AM

12
#>230 - Kate / @Arohanui

05/04/2013 at 03:07AM

13
#>350 - Kate / @Arohanui

10/28/2012 at 03:53AM

13
#>353 - Kate / @Arohanui

05/04/2013 at 02:03AM

13
#>353 - Kate / @Arohanui

05/04/2013 at 02:04AM

14
#>445 - Kate / @Arohanui

10/28/2012 at 03:48AM

14
#>450 - Kate / @Arohanui

05/04/2013 at 02:00AM

15
#>532 - Kate / @Arohanui

05/04/2013 at 01:59AM

23
#>636 - Kate / @Arohanui

05/04/2013 at 01:56AM