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):
15
#391 - 鍵岡 / @good_chiaka

07/10/2021 at 11:10AM

15
#392 - Ali Aslan / @AliAsla95742367

07/13/2021 at 12:55PM

15
#393 - I_Don't_Want_This_Account / @IDontWa59298038

07/15/2021 at 12:48AM

15
#394 - jan kovacovsky / @JanKovacovsky

11/21/2021 at 07:17PM

15
#395 - Ryan Murphy / @RyanMur03026891

03/15/2022 at 12:41PM

15
#396 - 张贤德 / @heather_real_

07/14/2022 at 02:29PM

15
#397 - @AndrewRadev@hachyderm.io / @andrewradev

03/06/2023 at 06:24PM

15
#398 - Olivier Bégassat / @zk_evm

05/27/2023 at 02:46PM

15
#399 - Святозар Петренко / @SvatozarPetren1

10/04/2023 at 02:19PM

15
#400 - mferrandon / @mferrandon

12/14/2023 at 10:33AM

16
#401 - Rob / @merob

03/12/2021 at 12:46PM

16
#402 - anna / @moonbeeaam

03/15/2021 at 03:28PM

16
#403 - Harshit Hajela / @HarshitHajela

04/09/2021 at 12:51AM

16
#404 - simplelife2010 / @simplelife20101

05/13/2021 at 09:38AM

16
#405 - Jaime Holaday / @polyrhythm3

05/14/2021 at 08:00PM

16
#406 - comdicap / @comdicap

05/27/2021 at 09:55PM

16
#407 - A White Dwarf / @AWhiteDwarf1

07/01/2021 at 09:08PM

16
#408 - Ron-Shan,Chang / @highlupin

07/11/2021 at 10:33AM

16
#409 - Un Extraño / @link145m

07/29/2021 at 11:25PM

16
#410 - N2427B / @N2427B

08/03/2021 at 09:09PM

16
#411 - Craig Euler / @euler_craig

09/26/2021 at 03:04AM

16
#412 - Pi IPE / @PiIsEducational

01/16/2022 at 02:21PM

16
#413 - Whirs / @tinywhirs

03/05/2022 at 10:41PM

16
#414 - @grhkm@infosec.exchange / @grhkm21

12/20/2022 at 10:51AM

16
#415 - D G G / @DGJourneyman

02/21/2023 at 05:48AM

17
#416 - John Doe / @JohnDoe75830353

02/24/2021 at 03:50PM

17
#417 - Artur Dumchev / @Liverm0r

02/28/2021 at 01:33PM

17
#418 - terra / @terra_farm

03/03/2021 at 12:52AM

17
#419 - BenMedcalf / @BMedcalf_online

04/17/2021 at 03:03AM

17
#420 - Steven / @Hallzy_18

05/10/2021 at 09:06PM