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 @000AG000:

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

70 active golfers, 261 entries

Solutions by @000AG000:
19
#12 - 000AG000 / @000AG000

05/04/2026 at 08:14PM

22
#>26 - 000AG000 / @000AG000

05/04/2026 at 07:53PM

23
#>27 - 000AG000 / @000AG000

05/04/2026 at 07:46PM

25
#>35 - 000AG000 / @000AG000

05/04/2026 at 07:36PM

26
#>40 - 000AG000 / @000AG000

05/04/2026 at 07:31PM

27
#>41 - 000AG000 / @000AG000

05/04/2026 at 07:24PM