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 4229 remaining solutions by signing in and submitting your own entry
#4230 휘람 / @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

4230 active golfers, 11541 entries

Leaderboard (lowest score wins):
10
#3871 - Kyle Mitchell / @jcmkk3

11/10/2019 at 04:42AM

10
#3872 - David / @dalbertom

12/01/2019 at 07:53PM

10
#3873 - 煮沸的白開水 / @season_303030

12/02/2019 at 08:06AM

10
#3874 - Aaron / @_Lordofthevoid_

12/17/2019 at 05:49PM

10
#3875 - うりぼー@エンジニア志望 / @uriuribobo1998

12/22/2019 at 06:14AM

10
#3876 - Martin Huter / @marhat87

01/31/2020 at 12:22PM

10
#3877 - Kairew / @Kairew1

02/17/2020 at 02:14PM

10
#3878 - Bitt Faulk / @bittfaulk

02/18/2020 at 09:58PM

10
#3879 - 十郎☔ / @juro106

04/13/2020 at 09:36AM

10
#3880 - volandkit / @volandkit

04/20/2020 at 05:24PM

10
#3881 - Axel / @Axel07930943

05/05/2020 at 06:42AM

10
#3882 - Sebastian / @dersharky

05/13/2020 at 03:27PM

10
#3883 - Lukasz Anforowicz / @LAnforowicz

05/27/2020 at 04:44AM

10
#3884 - Patrick Weigert / @PatrickWeigert

06/01/2020 at 02:21AM

10
#3885 - shkwon / @shkwon10

06/16/2020 at 12:56PM

10
#3886 - Mellow Tractor / @mellowtractor

06/19/2020 at 03:14PM

10
#3887 - ithirty / @ithirty4

06/23/2020 at 10:54AM

10
#3888 - Justin Or / @just_in_awe

07/04/2020 at 04:59AM

10
#3889 - Alejandro / @AlejandroE

07/19/2020 at 04:48PM

10
#3890 - drGsus / @drGsus

07/25/2020 at 06:30AM

10
#3891 - Christ / @Christ46234422

09/06/2020 at 12:15AM

10
#3892 - vimgolfer98746521 / @vimgolfer987461

09/06/2020 at 03:46PM

10
#3893 - Pat Haggerty / @HaggertyPat

09/09/2020 at 02:15PM

10
#3894 - Muradil / @MuradilUdun

10/21/2020 at 04:02PM

10
#3895 - Demian Martinez / @demianuco

11/01/2020 at 11:37PM

10
#3896 - just here to scroll. / @idontknow0001

11/15/2020 at 04:32PM

10
#3897 - Brye Walker / @bryewalks

11/28/2020 at 11:32PM

10
#3898 - said / @said13664960

12/15/2020 at 10:23PM

10
#3899 - Bob / @Bob25621943

12/17/2020 at 05:03PM

10
#3900 - Gunter Kluge / @KlugeGunter

01/04/2021 at 02:15PM