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 by @alythobani:

Unlock 3 remaining solutions by signing in and submitting your own entry
Created by: @I_am_JustThat

47 active golfers, 135 entries

Solutions by @alythobani:
10
#20 - Aly Thobani / @alythobani

05/31/2024 at 12:52AM

11
#>39 - Aly Thobani / @alythobani

05/31/2024 at 12:46AM

15
#>45 - Aly Thobani / @alythobani

05/31/2024 at 12:45AM