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 @Null-Delta:

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

172 active golfers, 642 entries

Solutions by @Null-Delta:
24
#67 - Delta Null / @Null-Delta

05/26/2026 at 11:42PM

24
#>67 - Delta Null / @Null-Delta

05/26/2026 at 11:51PM

25
#>73 - Delta Null / @Null-Delta

05/26/2026 at 11:36PM

26
#>84 - Delta Null / @Null-Delta

05/26/2026 at 11:33PM

27
#>85 - Delta Null / @Null-Delta

05/26/2026 at 11:31PM

28
#>94 - Delta Null / @Null-Delta

05/26/2026 at 11:09PM

28
#>94 - Delta Null / @Null-Delta

05/26/2026 at 11:16PM

28
#>94 - Delta Null / @Null-Delta

05/26/2026 at 11:21PM

30
#>106 - Delta Null / @Null-Delta

05/26/2026 at 11:07PM

31
#>116 - Delta Null / @Null-Delta

05/26/2026 at 10:58PM