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 by @GavinKoeng:

Unlock 9 remaining solutions by signing in and submitting your own entry
Created by: @iviarcio

522 active golfers, 1952 entries

Solutions by @GavinKoeng:
10
#238 - Gavin / @GavinKoeng

01/07/2026 at 02:34AM

11
#>278 - Gavin / @GavinKoeng

01/07/2026 at 02:34AM

12
#>316 - Gavin / @GavinKoeng

01/07/2026 at 02:33AM

13
#>358 - Gavin / @GavinKoeng

01/07/2026 at 02:33AM

14
#>381 - Gavin / @GavinKoeng

01/07/2026 at 02:33AM

15
#>400 - Gavin / @GavinKoeng

01/07/2026 at 02:32AM

15
#>400 - Gavin / @GavinKoeng

01/07/2026 at 02:32AM

16
#>415 - Gavin / @GavinKoeng

01/07/2026 at 02:32AM

22
#>495 - Gavin / @GavinKoeng

01/07/2026 at 02:31AM