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

Tables, Functions, Sprocs

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

Start file
sp_zebra
t_orangutan
t_buffalo
sp_walrus
fn_weight
fn_food
sp_lion
t_lion
sp_buffalo
t_walrus
fn_sleep
t_zebra
sp_orangutan
End file
t_buffalo
t_lion
t_orangutan
t_walrus
t_zebra
fn_food
fn_sleep
fn_weight
sp_buffalo
sp_lion
sp_orangutan
sp_walrus
sp_zebra

View Diff

1,2d0
< sp_zebra
< t_orangutan
4,7d1
< sp_walrus
< fn_weight
< fn_food
< sp_lion
9c3
< sp_buffalo
---
> t_orangutan
11d4
< fn_sleep
12a6,10
> fn_food
> fn_sleep
> fn_weight
> sp_buffalo
> sp_lion
13a12,13
> sp_walrus
> sp_zebra

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 46 remaining solutions by signing in and submitting your own entry
#47 Vim Golfer / @VimGolfer6 - Score: 19 - 08/21/19 @ 12:36
:sort<CR>:9,13 d<CR>ggPZZ

0 comments


Created by: @I_am_JustThat

47 active golfers, 135 entries

Leaderboard (lowest score wins):
11
#31 - JimmyGymglish / @JGymglish

01/02/2020 at 02:41PM

11
#32 - b0wman / @b0wman_x00

03/02/2021 at 12:41PM

11
#33 - omer vishlitzky / @OVishlitzky

03/16/2021 at 03:38PM

11
#34 - pikjes / @pikjes2

03/24/2021 at 08:51PM

11
#35 - Michel Viktor / @tomkpz

09/12/2021 at 02:08PM

11
#36 - Alex / @AlexanderHeatl2

07/06/2022 at 10:24PM

11
#37 - James / @Dronak

11/08/2022 at 09:54PM

11
#38 - moh ayaya / @AyayaMoh

09/08/2023 at 05:51PM

11
#39 - Luoyb / @Luoyb

10/30/2023 at 01:25AM

12
#40 - Damian Rodriguez / @damianrr

06/12/2019 at 02:35PM

12
#41 - Mac Goever / @MacGoever

06/12/2019 at 07:39PM

12
#42 - Valacar / @valacar

06/12/2019 at 11:32PM

12
#43 - majo senf / @majo_senf

06/14/2019 at 09:11AM

12
#44 - seul / @seul15987381

06/21/2019 at 04:41AM

13
#45 - steve / @steve35773420

11/27/2022 at 08:30PM

17
#46 - Paul Inc / @hiniol1982

06/26/2019 at 07:19PM

19
#47 - Vim Golfer / @VimGolfer6

08/21/2019 at 12:36PM