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 237 remaining solutions by signing in and submitting your own entry
#238 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

238 active golfers, 1037 entries

Leaderboard (lowest score wins):
17
#121 - Demian Martinez / @demianuco

12/09/2020 at 08:48PM

18
#122 - Ola / @Ola73745831

07/05/2019 at 09:51AM

18
#123 - Nick Yeow / @nickyeow

07/18/2019 at 04:39PM

18
#124 - Jonathan Browning / @yungjig90

07/30/2019 at 08:57PM

18
#125 - ciela / @lededex

08/28/2019 at 07:36PM

18
#126 - shota_ogswr / @shota_ogasawara

11/26/2019 at 03:20PM

18
#127 - Lion de Bell / @CLGBamboo

12/01/2019 at 08:26PM

18
#128 - tetstest / @tetstest4

12/25/2019 at 08:53PM

18
#129 - novax / @novax22953288

02/09/2020 at 01:20PM

18
#130 - 廖彥智 / @JeffYenchih

03/09/2020 at 10:31AM

18
#131 - Muhammad Affan / @maqur5

04/01/2020 at 03:35PM

18
#132 - dule2607 / @dule26071

04/30/2020 at 07:31PM

18
#133 - vito / @vito49999722

08/01/2020 at 10:28AM

19
#134 - Ari Sweedler / @Adsweed

06/07/2019 at 12:29AM

19
#135 - Malcolm Ramsay / @malramsay64

06/07/2019 at 03:22AM

19
#136 - Am Jam / @LoneJam

06/07/2019 at 03:13PM

19
#137 - Derrick Gill / @DerrickGill15

06/08/2019 at 02:20AM

19
#138 - Altafen_ / @Altafen1

06/14/2019 at 07:17AM

19
#139 - ixf / @ixfdv

07/05/2019 at 06:41PM

19
#140 - Chris Shorrock / @EbinFlow

08/14/2019 at 02:24PM

19
#141 - None / @sh1chuang

01/09/2020 at 11:52AM

19
#142 - Rune Warhuus / @DinkDonkNorway

01/23/2020 at 10:18AM

19
#143 - edvrds / @edvrds

04/16/2020 at 04:27PM

20
#144 - seul / @seul15987381

06/12/2019 at 08:36AM

20
#145 - Alexey Vyskubov / @avysk

06/12/2019 at 01:48PM

20
#146 - Mat / @matpbo

06/14/2019 at 10:19PM

20
#147 - Takayuki Sato / @yukitaka1974

06/21/2019 at 02:57PM

20
#148 - Test Account / @testycc

06/29/2019 at 12:41PM

20
#149 - André Reigoto / @AndreReigoto

08/09/2019 at 03:10PM

20
#150 - Alex Emelianov / @AlexEmelianov3

11/03/2019 at 11:20PM