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

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

235 active golfers, 956 entries

Solutions by @yunglatkes:
25
#112 - yunglatkes / @yunglatkes

09/04/2026 at 12:02AM

31
#>163 - yunglatkes / @yunglatkes

08/21/2026 at 04:44AM

33
#>174 - yunglatkes / @yunglatkes

08/21/2026 at 04:40AM

35
#>196 - yunglatkes / @yunglatkes

08/21/2026 at 04:26AM

35
#>196 - yunglatkes / @yunglatkes

08/21/2026 at 04:36AM

36
#>201 - yunglatkes / @yunglatkes

08/21/2026 at 04:23AM

37
#>206 - yunglatkes / @yunglatkes

08/21/2026 at 04:30AM

101
#>233 - yunglatkes / @yunglatkes

08/21/2026 at 04:18AM

134
#>233 - yunglatkes / @yunglatkes

08/21/2026 at 04:14AM