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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 185 remaining solutions by signing in and submitting your own entry
#186 Phạm Gia Huy / @huypham11 - Score: 219 - 06/11/26 @ 06:45
<LeftMouse><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftRelease><C-C><C-C><LeftMouse><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftDrag><LeftRelease><C-C><C-C><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelDown><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><ScrollWheelUp><Up><Up><Up><Up><Up>d<BS><0xc4><0x91>ii<BS><Esc>lllld<BS><0xc4><0x91><BS>ddjkwwww?<BS>/#<CR>d$x/<CR>/#<CR>d$<C-Z>x/<BS>/<CR>d$xkbdawwwi,5<BS>ui<BS><BS><Esc>ui, <0xc6><0xb0><BS>width<Esc>jjkkjkhhhhhhhhhhhhhhidi<Right><Right><BS><BS><BS><BS><Esc>:<0xc6><0xb0><BS>wq<CR>

0 comments


Created by: @skywalkerwhack

186 active golfers, 701 entries

Leaderboard (lowest score wins):
62
#181 - Stan / @StanKarz

06/24/2026 at 12:28AM

69
#182 - JasonLuo-4 / @JasonLuo-4

06/09/2026 at 08:36AM

74
#183 - wangtao / @wtao44425-commits

06/11/2026 at 11:21AM

85
#184 - shidemere / @shidemere

05/31/2026 at 09:41PM

160
#185 - dustycelary / @dustycelary

07/07/2026 at 07:22PM

219
#186 - Phạm Gia Huy / @huypham11

06/11/2026 at 06:45AM