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 54862fbb3f90ac0002904cf5

Just the middle

Delete the instructions at the top and bottom.

Start file
Leave only the
numbered lines.
LINE 1
LINE 2
LINE 3
That's all.
Thank you
very much.
End file
LINE 1
LINE 2
LINE 3

View Diff

1,2d0
< Leave only the
< numbered lines.
6,8d3
< That's all.
< Thank you
< very much.

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 4211 remaining solutions by signing in and submitting your own entry
#4212 휘람 / @Brandhwi_0129 - Score: 120 - 06/29/18 @ 08:34
sdj<Down><Right><Left><Down><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>ZZ<BS><BS><Esc>ZZ

@saurabh908583: sdj -- dj make sense it deletes the top 2 lines for me but if I s press sdj it does 'Leave only the' >>>> 'djave only the' ... how did you do it? do you have key map

1 comment


Created by: @udioica

4212 active golfers, 11493 entries

Leaderboard (lowest score wins):
8
#3211 - Alexander Weers / @aweers

10/30/2024 at 10:16PM

8
#3212 - Brice Bischoff / @B-Bischoff

11/07/2024 at 09:07AM

8
#3213 - 🥚 / @schmarles_

11/10/2024 at 10:18PM

8
#3214 - Pim / @Pireax

11/11/2024 at 12:41AM

8
#3215 - Pablo Acuna / @pacuna

11/28/2024 at 02:28AM

8
#3216 - Kumaran / @kumaran-14

12/03/2024 at 11:14PM

8
#3217 - Magnus Wahlstrand / @magnuswahlstrand

12/25/2024 at 08:06AM

8
#3218 - Demian Martinez / @demianuco

01/09/2025 at 05:38PM

8
#3219 - martinorav / @martinorav

01/12/2025 at 06:24PM

8
#3220 - Sebastian Bille / @TastefulElk

01/13/2025 at 11:57AM

8
#3221 - JohanNorberg / @JohanNorberg

01/25/2025 at 09:01PM

8
#3222 - Peter Wang / @omgitsabackup

01/28/2025 at 12:38AM

8
#3223 - Akito Sano / @Szkieletor37

03/30/2025 at 12:46PM

8
#3224 - UrbanNinja1010 / @UrbanNinja1010

04/04/2025 at 03:39PM

8
#3225 - Brian Rhees / @brhees

04/24/2025 at 06:35PM

9
#3226 - Tibor Claassen / @codebeige

12/09/2014 at 05:26AM

9
#3227 - Kévin R / @shaiton_

12/11/2014 at 10:50AM

9
#3228 - Sandeep Kumar Gupta / @skgBanga

12/15/2014 at 04:53AM

9
#3229 - Yuval Goncz / @YGoncho

12/18/2014 at 04:16PM

9
#3230 - r. / @rmarvie

12/25/2014 at 08:30PM

9
#3231 - daltonridenhour / @daltonridenhour

12/27/2014 at 10:46PM

9
#3232 - Tamás Torba / @torbatamas

12/30/2014 at 01:53PM

9
#3233 - Fontana Lorenzo / @fntlnz

01/03/2015 at 01:15PM

9
#3234 - makohoek / @MattijsKorp

01/07/2015 at 12:21PM

9
#3235 - Charles H. Leggett / @cleggett

01/08/2015 at 03:42PM

9
#3236 - Ulysse Carion / @ucarion

01/13/2015 at 03:20AM

9
#3237 - Charles Wu / @Congeec

01/13/2015 at 01:32PM

9
#3238 - guguojie / @kelvinhust

01/14/2015 at 05:43AM

9
#3239 - Raynard, Jordan / @raynard_jordan

01/14/2015 at 01:11PM

9
#3240 - Frederik Schubert / @fschubert

01/15/2015 at 06:24PM