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

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

97 active golfers, 356 entries

Solutions by @Liimurr:
19
#10 - Liimurr / @Liimurr

04/29/2026 at 02:52PM

21
#>34 - Liimurr / @Liimurr

04/29/2026 at 02:48PM

23
#>36 - Liimurr / @Liimurr

04/29/2026 at 02:40PM

25
#>43 - Liimurr / @Liimurr

04/29/2026 at 02:34PM

25
#>43 - Liimurr / @Liimurr

04/29/2026 at 02:36PM

27
#>53 - Liimurr / @Liimurr

04/29/2026 at 02:29PM

36
#>85 - Liimurr / @Liimurr

04/29/2026 at 02:25PM

40
#>92 - Liimurr / @Liimurr

04/29/2026 at 02:24PM

42
#>94 - Liimurr / @Liimurr

04/28/2026 at 06:44PM

45
#>95 - Liimurr / @Liimurr

04/28/2026 at 06:49PM

66
#>97 - Liimurr / @Liimurr

04/28/2026 at 06:47PM