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

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

235 active golfers, 956 entries

Solutions by @robboek:
19
#44 - Rob Boek / @robboek

08/05/2026 at 04:31AM

20
#>70 - Rob Boek / @robboek

08/05/2026 at 04:30AM

21
#>80 - Rob Boek / @robboek

08/05/2026 at 04:28AM

22
#>85 - Rob Boek / @robboek

08/05/2026 at 04:25AM

24
#>97 - Rob Boek / @robboek

08/05/2026 at 04:25AM

29
#>146 - Rob Boek / @robboek

08/05/2026 at 04:15AM

30
#>153 - Rob Boek / @robboek

08/05/2026 at 04:12AM

33
#>174 - Rob Boek / @robboek

08/05/2026 at 04:11AM

36
#>201 - Rob Boek / @robboek

08/05/2026 at 04:08AM

39
#>212 - Rob Boek / @robboek

08/05/2026 at 03:58AM

93
#>233 - Rob Boek / @robboek

08/05/2026 at 03:57AM