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

4232 active golfers, 11546 entries

Leaderboard (lowest score wins):
9
#3661 - alrito / @alrito6

09/12/2020 at 10:45PM

9
#3662 - Lex Romanov / @feax_ru

09/29/2020 at 05:35PM

9
#3663 - Arend Peter / @APCastelein

10/01/2020 at 01:25AM

9
#3664 - rr / @rodgeur31

10/14/2020 at 09:49PM

9
#3665 - hhh / @hhh78116797

10/17/2020 at 04:29PM

9
#3666 - Matt Milliron / @valueiron

11/28/2020 at 05:01AM

9
#3667 - david / @david52856086

12/15/2020 at 10:52PM

9
#3668 - doran / @doran89993520

12/21/2020 at 04:53PM

9
#3669 - 방일우 / @CD5PpB36ZR5kWtk

01/07/2021 at 12:46AM

9
#3670 - ルシュメ / @arupakanohito

12/12/2021 at 09:51AM

9
#3671 - 一茶(ISSA) / @edge2992

05/29/2022 at 01:45AM

9
#3672 - JustForGiggles / @NeedOneForNow

04/03/2023 at 12:36AM

9
#3673 - steve / @steve35773420

05/14/2023 at 08:15PM

9
#3674 - Hemram Kumarapu / @H4-MM-3R

09/21/2024 at 02:31PM

9
#3675 - luke37842 / @luke37842

11/12/2024 at 06:56PM

9
#3676 - SRINIVASU SALADI / @SRINIVASUS22587

02/07/2025 at 09:54AM

9
#3677 - Eric-Ewing / @Eric-Ewing

08/19/2025 at 10:48PM

10
#3678 - Amit Verma / @amitv12

12/08/2014 at 11:44PM

10
#3679 - Ricardo M. Vilchis / @ajkaanbal

12/08/2014 at 11:55PM

10
#3680 - Larry Boltovskoi / @larrybolt

12/09/2014 at 01:15AM

10
#3681 - Paul Salcido / @PaulCodeMonkey

12/10/2014 at 04:33PM

10
#3682 - Juampy NR / @juampynr

12/11/2014 at 01:19PM

10
#3683 - Sergio M / @__smarquez

12/24/2014 at 03:02PM

10
#3684 - Jordana Lachow / @TomofBedlam

12/28/2014 at 04:48AM

10
#3685 - Gianluca Scacco / @gscacco

01/07/2015 at 11:53AM

10
#3686 - Vasily Toropov / @vasandtor

01/12/2015 at 11:17AM

10
#3687 - Jason Garber / @jasongarber

01/15/2015 at 06:15PM

10
#3688 - Steve / @Logogenics

01/16/2015 at 12:53AM

10
#3689 - Ilia Kolev / @iliakolev

01/19/2015 at 10:15AM

10
#3690 - Trần Huy Vũ / @vutran54

01/19/2015 at 12:11PM