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 9v0069dd19600000000007c9

Swap function parameters and delete all comments in python.

Swap function parameters and delete all comments in python.

Start file
# caculate area
def calculate_area(width, height): # width, height
    return width * height # return area

area1 = calculate_area(5, 10)
area2 = calculate_area(8, 12)
End file
def calculate_area(height, width):
    return width * height

area1 = calculate_area(5, 10)
area2 = calculate_area(8, 12)

View Diff

1,3c1,2
< # caculate area
< def calculate_area(width, height): # width, height
<     return width * height # return area
---
> def calculate_area(height, width):
>     return width * height

Solutions by @JRPrice5:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @skywalkerwhack

94 active golfers, 335 entries

Solutions by @JRPrice5:
19
#9 - Jess Price / @JRPrice5

04/27/2026 at 01:11PM

20
#>22 - Jess Price / @JRPrice5

04/27/2026 at 01:09PM

21
#>31 - Jess Price / @JRPrice5

04/27/2026 at 01:08PM

23
#>33 - Jess Price / @JRPrice5

04/27/2026 at 01:03PM

24
#>39 - Jess Price / @JRPrice5

05/03/2026 at 03:34PM

27
#>50 - Jess Price / @JRPrice5

04/27/2026 at 01:00PM

32
#>68 - Jess Price / @JRPrice5

04/27/2026 at 12:54PM

44
#>92 - Jess Price / @JRPrice5

04/27/2026 at 12:48PM