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

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

120 active golfers, 426 entries

Solutions by @adambarla:
29
#71 - Adam Barla / @adambarla

05/05/2026 at 08:33PM

35
#>100 - Adam Barla / @adambarla

05/05/2026 at 08:23PM

37
#>105 - Adam Barla / @adambarla

05/05/2026 at 11:37AM

37
#>105 - Adam Barla / @adambarla

05/05/2026 at 11:37AM

44
#>112 - Adam Barla / @adambarla

05/05/2026 at 08:22PM

50
#>117 - Adam Barla / @adambarla

05/05/2026 at 11:35AM

73
#>120 - Adam Barla / @adambarla

05/05/2026 at 11:35AM

78
#>120 - Adam Barla / @adambarla

05/05/2026 at 11:34AM