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):
11
#241 - b0wman / @b0wman_x00

02/27/2021 at 01:51PM

11
#242 - Dmitrii Bugrov / @dmitrii_bugrov

02/28/2021 at 07:05PM

11
#243 - qsdfqsdf / @qsdfqsd83220776

03/04/2021 at 07:52PM

11
#244 - Emil Braserud / @Erdustiggen

03/06/2021 at 02:23PM

11
#245 - kok / @kok89428331

03/09/2021 at 01:16PM

11
#246 - Janek Szynal / @rrszynka

03/09/2021 at 07:14PM

11
#247 - JohnDoe02 / @Doe02John

03/15/2021 at 04:05PM

11
#248 - jotalera de arrascaeta / @jotachico

03/15/2021 at 05:48PM

11
#249 - 김범준 / @kmbmjn

05/10/2021 at 11:40AM

11
#250 - :wq / @write_quit_22

05/18/2021 at 04:36PM

11
#251 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:21AM

11
#252 - iBhagwan / @iiBhagwan

07/07/2021 at 04:02AM

11
#253 - Lean Lunch / @LunchLean

07/29/2021 at 06:03PM

11
#254 - Matrices Matlab #1 / @matrices_matlab

07/30/2021 at 11:33AM

11
#255 - Shreeram / @Shrimpraam

08/24/2021 at 03:09AM

11
#256 - yancy / @yancy_dong

09/22/2021 at 02:27AM

11
#257 - 100fürn / @hilvmir

09/25/2021 at 07:35PM

11
#258 - yxke / @_yxke

12/17/2021 at 03:01AM

11
#259 - Ramtin Martin / @martin_ramtin

03/22/2022 at 01:36AM

11
#260 - James Duffy / @jduffy3

04/12/2022 at 02:02AM

11
#261 - ff df / @ffdf93207177

04/18/2022 at 02:45AM

11
#262 - ._. / @Katharsic

04/24/2022 at 07:39AM

11
#263 - M Joc / @MJoc72389438

06/25/2022 at 06:27PM

11
#264 - b1gz / @_b1gz

03/06/2023 at 05:51PM

11
#265 - FirstModus / @Nolimimer

03/26/2023 at 10:06PM

11
#266 - John Huynh / @huynh_j93

04/29/2023 at 11:57PM

11
#267 - Spamz 254 / @Spamz254

08/31/2023 at 08:45AM

11
#268 - Ludovic Schwartz / @ludovicschwartz

11/17/2023 at 03:46PM

11
#269 - asirago / @asiragoo

12/13/2023 at 12:11PM

11
#270 - Antoine Biard / @antoan2

12/18/2023 at 01:55PM