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 69 remaining solutions by signing in and submitting your own entry
#70 Emek Cohen / @EmekC - Score: 49 - 04/25/26 @ 14:16
ddfwvecheight<Esc>wwvecwidth<Esc>wllv$hx<Esc>jbbhv$xa<CR><Esc>kj:wq<CR>

0 comments


Created by: @skywalkerwhack

70 active golfers, 261 entries

Leaderboard (lowest score wins):
24
#31 - Biagio Trimarchi / @ngr-btrimarchi

04/24/2026 at 01:00PM

24
#32 - Pranav Varkey / @Daedalus-op

04/24/2026 at 03:58PM

24
#33 - caleb-dilsavor / @caleb-dilsavor

04/27/2026 at 04:31AM

24
#34 - Sven Fischer / @svenihoney

05/02/2026 at 02:55PM

25
#35 - Swaraj Dash / @swarajdash

04/27/2026 at 01:23PM

25
#36 - Ryan Bergman / @stuyry

05/06/2026 at 07:24PM

25
#37 - rkucsora / @rkucsora

05/07/2026 at 06:08PM

25
#38 - Luis Emilio / @Lemaclo

05/09/2026 at 05:41PM

26
#39 - A White Dwarf / @AWhiteDwarf1

05/03/2026 at 05:56PM

26
#40 - Simon Guichandut / @simonguichandut

05/03/2026 at 05:58PM

26
#41 - Salvatore Farina / @sfarina

05/08/2026 at 01:21AM

28
#42 - Alex Clough / @CodingInRhythm

04/25/2026 at 08:04PM

28
#43 - Encar Salazar / @nekomangini

04/30/2026 at 12:43PM

28
#44 - LilRain / @3hiuwoo

04/30/2026 at 12:53PM

28
#45 - Daniel Zhang / @Yourself1011

05/11/2026 at 08:17PM

29
#46 - Scotty Mikul / @ScottMikul

04/22/2026 at 03:42PM

29
#47 - Gabe Kuslansky / @gabekus

04/25/2026 at 08:36PM

29
#48 - Adam Barla / @adambarla

05/05/2026 at 08:33PM

29
#49 - Gabriel / @godka-byte

05/12/2026 at 05:43PM

30
#50 - Nathan / @NathanSnail

04/28/2026 at 05:40AM

31
#51 - Mitchel Kerckhaert / @MitchelKerckhaert

04/22/2026 at 10:07AM

31
#52 - Isak Jacobsson / @IsakJacobsson

05/01/2026 at 01:04PM

31
#53 - Thomas van Rossum / @ThomasvanR70616

05/02/2026 at 09:50AM

31
#54 - Edgar / @Edgarchuk

05/03/2026 at 09:39AM

31
#55 - Binaryman / @Bynaryman

05/11/2026 at 10:12AM

33
#56 - Denis Roussel / @denrou

04/17/2026 at 06:02PM

33
#57 - interminable007 / @interminable007

05/13/2026 at 07:26PM

34
#58 - Jean-Valery / @Jvaxx

04/26/2026 at 03:47PM

34
#59 - Agustín Caviglia / @afcaviglia

05/02/2026 at 02:52PM

34
#60 - K. Su / @kkkksu

05/04/2026 at 09:18PM