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):
13
#331 - Paweł Styczewski / @kryspuss

05/19/2021 at 11:03AM

13
#332 - dreamers00 / @dreamers003

05/23/2021 at 06:31PM

13
#333 - Lee Kian Tat Ken / @thekingtat

06/07/2021 at 08:04AM

13
#334 - Jacob Wood / @jacoblandonwood

06/15/2021 at 03:07AM

13
#335 - ボードゲーム! / @boardgame_JP

07/17/2021 at 01:54AM

13
#336 - Tom / @Toromtomtom

08/11/2021 at 12:54PM

13
#337 - Armand Coretchi / @armandcoretchi_

08/13/2021 at 02:54PM

13
#338 - Rory Smith / @alan0buchanan

09/14/2021 at 09:44PM

13
#339 - Scott Berger / @scottberger

09/26/2021 at 05:00AM

13
#340 - Jon Powers / @JonKPowers

10/22/2021 at 12:35AM

13
#341 - Ken / @kenc_

01/20/2022 at 06:25AM

13
#342 - emilio / @emilioemmanueI

02/17/2022 at 09:32PM

13
#343 - Yochem van Rosmalen / @yoch3m

03/11/2022 at 06:14PM

13
#344 - Wojtic / @Wojtic1

03/31/2022 at 02:04PM

13
#345 - Henry Chimpden Earwicker / @HChEarwicker

06/14/2022 at 07:00AM

13
#346 - George Granberry / @JudgeJerj

06/26/2022 at 04:20PM

13
#347 - Brandon / @Brandon10678836

08/30/2022 at 04:13PM

13
#348 - James Marshall / @astrophd

10/12/2022 at 06:29PM

13
#349 - vimgolfaccfekxh / @vimgolfaccfekxh

10/19/2022 at 10:18PM

13
#350 - James / @Dronak

10/23/2022 at 04:00AM

13
#351 - Dank City / @ddankcity

12/08/2022 at 06:26PM

13
#352 - Vinay Sridhar / @kewllip

03/26/2023 at 10:53AM

13
#353 - Divvy C. / @divvy_c

08/13/2023 at 12:44PM

13
#354 - Chris Braissant / @braissac

10/18/2023 at 08:32PM

13
#355 - rayx / @ray-x

12/08/2023 at 10:14AM

13
#356 - armaninux / @armaninux

04/06/2024 at 01:00PM

13
#357 - Kevin Traver / @kevintraver

04/10/2024 at 04:37PM

13
#358 - Elliot Schemmel / @regulated

10/07/2024 at 08:25PM

14
#359 - Robert Blackwell / @blackfromchina

02/24/2021 at 02:01AM

14
#360 - Tobia Bocchi / @BocchiTobia

02/24/2021 at 03:30PM