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 5cf8aa1281437e000c4df724

Reorder the groups

Change the order so that the groups of fruit come before the vegetables.

Start file
# vegetable
broccoli
spinach
carrot
-
# fruit
peach
plum
-
# vegetable
potato
-
# fruit
apple
banana
-
# vegetable
onion
-
# fruit
watermelon
cherry
-
End file
# fruit
peach
plum
-
# fruit
apple
banana
-
# fruit
watermelon
cherry
-
# vegetable
broccoli
spinach
carrot
-
# vegetable
potato
-
# vegetable
onion
-

View Diff

1,5d0
< # vegetable
< broccoli
< spinach
< carrot
< -
10,12d4
< # vegetable
< potato
< -
17,19d8
< # vegetable
< onion
< -
22a12,22
> -
> # vegetable
> broccoli
> spinach
> carrot
> -
> # vegetable
> potato
> -
> # vegetable
> onion

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 245 remaining solutions by signing in and submitting your own entry
#246 Zestv / @fuesii - Score: 137 - 03/04/20 @ 08:10
<Down><Down><Down><Down><Down><Down><Down><Down>ov<BS><Esc>v<Up><Up><Up><Up>d<Up><Up><Up><Up><Up>p<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Left>v<Down><Down><Down><Right>d<Up><Up><Up><Up><Up><Up><Up><Up><Up>p<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down>v<Down><Down><Down><Right>d<Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>p<Down><Down><Down><Down>i#<Right><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><BS><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><BS><Esc>:x<CR>

0 comments


Created by: @valacar

246 active golfers, 1071 entries

Leaderboard (lowest score wins):
20
#151 - Sato Takayuki / @yukitaka1974

06/21/2019 at 02:57PM

20
#152 - Test Account / @testycc

06/29/2019 at 12:41PM

20
#153 - André Reigoto / @AndreReigoto

08/09/2019 at 03:10PM

20
#154 - Alex Emelianov / @AlexEmelianov3

11/03/2019 at 11:20PM

20
#155 - Wenbo / @nuxping1

12/29/2019 at 01:15PM

20
#156 - Oleg / @colega

01/29/2020 at 09:42AM

20
#157 - BnnGolfer / @BnnGolfer

03/25/2020 at 06:30PM

20
#158 - Jason / @roosjason

04/15/2020 at 06:50AM

20
#159 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 12:10PM

20
#160 - Joshua Parco / @JoshuaParco2

12/19/2020 at 03:10AM

21
#161 - Frank / @fvbever

06/07/2019 at 07:49AM

21
#162 - albalitz / @_albalitz

06/07/2019 at 08:06AM

21
#163 - Juraj Skvarla / @JurajSkvarla

06/10/2019 at 03:28PM

21
#164 - Raphael / @Console64

06/10/2019 at 03:37PM

21
#165 - Prashanth / @Prashanth157T

06/12/2019 at 04:12AM

21
#166 - Paul Inc / @hiniol1982

06/23/2019 at 08:20AM

21
#167 - Aurel / @AurelienFebvre

06/23/2019 at 08:06PM

21
#168 - Καράτε Μόνο / @karate_mono

06/24/2019 at 12:38PM

21
#169 - Egor Fedkin / @Jet_Flynn

06/25/2019 at 07:35AM

21
#170 - Karan Gajwani / @karangb

07/12/2019 at 10:23PM

21
#171 - Ben Allan / @hellobenallan

08/19/2019 at 01:56PM

21
#172 - kevinski / @kevinsk30746831

08/22/2019 at 03:46PM

21
#173 - José / @AngelGaldamez

08/26/2019 at 12:57AM

21
#174 - Andrei Popescu / @AndreiTheory

12/09/2019 at 09:53PM

21
#175 - Yannick / @Yannick88147038

09/20/2020 at 06:49PM

22
#176 - Erik Lindeborg / @ErikLindeborg

06/07/2019 at 02:42PM

22
#177 - Just...That / @I_am_JustThat

06/11/2019 at 01:06PM

22
#178 - couaber / @couaber

06/23/2019 at 07:13PM

22
#179 - Vim Golfer / @VimGolfer6

07/07/2019 at 10:45AM

22
#180 - dahara / @kuma_moooon

08/15/2019 at 03:05PM