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):
7
#1501 - Mohammad Apel Mahmod / @apel_mahmod

09/17/2023 at 03:29AM

7
#1502 - Ludovic Schwartz / @ludovicschwartz

11/17/2023 at 01:45PM

7
#1503 - asirago / @asiragoo

12/07/2023 at 07:21AM

7
#1504 - sosa-daniel / @sosa-daniel

12/29/2023 at 07:40AM

7
#1505 - Kory Newton / @korynewton

02/03/2024 at 10:23PM

7
#1506 - Andy / @andyfoster

04/06/2024 at 01:28AM

7
#1507 - Peppa Pig / @PeppaPigSg

04/07/2024 at 10:33AM

7
#1508 - Don'tBeAlarmed / @DontBeAlarmed

05/30/2024 at 06:37AM

7
#1509 - jantijn / @jantijn

07/13/2024 at 07:34PM

7
#1510 - nickGPT / @nickandbro

08/28/2024 at 04:53AM

7
#1511 - Andrew / @a0di

11/04/2024 at 08:36PM

7
#1512 - Sergey Valiev / @Valiev

02/23/2025 at 08:24AM

7
#1513 - zhs / @ZH-S

04/24/2025 at 03:39AM

7
#1514 - CronosH2O / @cronosh2o

04/27/2025 at 12:35PM

7
#1515 - Breemskin / @Breemskin

08/18/2025 at 05:26PM

7
#1516 - Bhavya Gupta / @Gamin8ing

08/19/2025 at 08:15PM

7
#1517 - rwalle / @rwalle

09/16/2025 at 03:14AM

7
#1518 - tphLatte / @tphLatte

11/25/2025 at 02:25AM

7
#1519 - fiore / @fiore57

12/30/2025 at 08:39AM

8
#1520 - James / @Dronak

12/09/2014 at 12:01AM

8
#1521 - Allen Toy / @allen_toy

12/09/2014 at 12:12AM

8
#1522 - Karun Ramakrishnan / @the_karun

12/09/2014 at 02:23AM

8
#1523 - Alex K / @alex_kononovich

12/09/2014 at 07:04AM

8
#1524 - Gammelin Guillaume / @ggammelin

12/09/2014 at 07:58AM

8
#1525 - Joel S. / @joelthelion

12/09/2014 at 08:01AM

8
#1526 - farseer / @FarseerSee2012

12/09/2014 at 08:13AM

8
#1527 - Josu Oyanguren / @josuoyanguren

12/09/2014 at 08:42AM

8
#1528 - Ram Tamtam / @ramtamtamtam

12/09/2014 at 08:49AM

8
#1529 - mnx / @mnxx

12/09/2014 at 09:00AM

8
#1530 - Eduardo / @earada

12/09/2014 at 10:08AM