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 60340000c06738000924d803

Inverting Lines

A simple challenge to invert all lines, except the first.

Start file
Here’s the thing about Vim.
Ex mode too, and it’s magic! 
Ex commands, there be dragons!
Until you realize it can help you be more efficient.
Learning about regexes sounds boring,
End file
Here’s the thing about Vim.
Learning about regexes sounds boring,
Until you realize it can help you be more efficient.
Ex commands, there be dragons!
Ex mode too, and it’s magic! 

View Diff

2,4d1
< Ex mode too, and it’s magic! 
< Ex commands, there be dragons!
< Until you realize it can help you be more efficient.
5a3,5
> Until you realize it can help you be more efficient.
> Ex commands, there be dragons!
> Ex mode too, and it’s magic! 

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 521 remaining solutions by signing in and submitting your own entry
#522 nagomin25 / @nagomin25 - Score: 95 - 09/15/25 @ 02:21
jjjjjddkki<CR><Up><Esc>p<Up>dd<Down><Down><Down>dd<Up>pdd<Up><Up><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>o<Esc>p<Up>dd<Down><Down>dd<Up>o<Esc>p<Up>dd<Esc>:wq<CR>

0 comments


Created by: @iviarcio

522 active golfers, 1952 entries

Leaderboard (lowest score wins):
19
#451 - Arvindh / @spccetime

02/27/2021 at 05:57AM

19
#452 - Cristian Perez Jensen / @Cristia70033867

03/03/2021 at 12:27AM

19
#453 - Gabriel Brousset / @GabBrousset

03/05/2021 at 05:02PM

19
#454 - John / @John18352044

03/09/2021 at 11:19AM

19
#455 - thiago viana / @thide11

03/15/2021 at 04:38AM

19
#456 - ouuan / @ouuan

03/20/2021 at 03:30PM

19
#457 - Nikita Evdokimov / @EvdokimovN

05/13/2021 at 02:44PM

19
#458 - Roman Matzutt / @matzutt

06/13/2021 at 01:50PM

19
#459 - Aastha Grover / @awaitingzenith

06/19/2021 at 05:43PM

19
#460 - Lucas Hourquin / @LHourquin

06/24/2021 at 01:42AM

19
#461 - Jean-Francois Parent / @hacker_pyrat

08/01/2021 at 06:14PM

19
#462 - Darius Smaliukas / @daraz999

11/04/2021 at 03:31PM

19
#463 - Seonu Kim / @SeonuvonK

01/11/2022 at 08:29AM

19
#464 - Никита Семёнов / @NiKoS1707

04/13/2022 at 10:20PM

19
#465 - satake0916 / @satake0916

12/27/2023 at 01:15AM

19
#466 - steed90 / @steed90

04/04/2024 at 11:37AM

20
#467 - NewErA / @NewErA79506535

02/24/2021 at 12:44AM

20
#468 - Borna Sadeghi / @borna_sadeghi

03/01/2021 at 08:50PM

20
#469 - 지준혁 / @CfX5fveOHOlydj2

03/02/2021 at 01:20AM

20
#470 - tarsiec / @tarsiec

03/02/2021 at 03:01PM

20
#471 - P. Silintziris / @silintzir

03/07/2021 at 12:37AM

20
#472 - Prof. Sucrose / @ProfSucrose

03/10/2021 at 11:52PM

20
#473 - Cameron Voss / @CameronVoss11

03/11/2021 at 03:10PM

20
#474 - Gaulish_Coder / @GaulishC

11/15/2021 at 10:13PM

20
#475 - 盧小小 / @VegetaLu

04/02/2022 at 06:07AM

20
#476 - Gunter Kluge / @KlugeGunter

04/06/2022 at 04:54PM

20
#477 - reteach / @roblox_reteach

03/25/2023 at 05:16AM

20
#478 - huateng ma / @spr1ng_fei

04/16/2023 at 03:45AM

20
#479 - Golfer / @golfplayervim

04/26/2023 at 03:24PM

20
#480 - 한상우 / @rightpair24

09/11/2023 at 12:28PM