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):
10
#1 - Alexey Vyskubov / @avysk

06/12/2019 at 01:39PM

10
#2 - Saki Gw / @Sakigw

06/12/2019 at 02:43PM

10
#3 - Tinko Minko / @tandikula

06/12/2019 at 02:48PM

10
#4 - John Braxler / @braxler

06/12/2019 at 03:25PM

10
#5 - Jon Krause / @jkrause314

06/12/2019 at 03:46PM

10
#6 - james_bunch / @james_bunch

06/12/2019 at 05:26PM

10
#7 - "Smylers" / @Smylers2

06/12/2019 at 10:28PM

10
#8 - Paul Yates / @PYates77

06/17/2019 at 06:18PM

10
#9 - hodenkobold66 / @hodenkobold66

06/25/2019 at 01:15PM

10
#10 - Miłosz Łakomy / @foobar01123

07/07/2019 at 01:06PM

10
#11 - Neil Struthers / @struthersneil

07/18/2019 at 04:53PM

10
#12 - 🦉 / @die_4001

07/25/2019 at 03:18PM

10
#13 - sooqua / @sooqua

08/09/2019 at 04:33AM

10
#14 - Fabien C. / @vaga_io

08/13/2019 at 07:12PM

10
#15 - Melvin Cheung / @MelvinCheung

11/12/2019 at 02:07AM

10
#16 - RockerZZY / @rocker_zzy

06/23/2020 at 09:08AM

10
#17 - 김범준 / @kmbmjn

03/10/2021 at 11:47AM

10
#18 - dorianm / @dorianm

05/09/2022 at 01:45AM

10
#19 - Janzen / @__Coos

10/04/2022 at 01:00PM

10
#20 - Aly Thobani / @alythobani

05/31/2024 at 12:52AM

10
#21 - Peppa Pig / @PeppaPigSg

07/02/2024 at 07:17AM

10
#22 - nickGPT / @nickandbro

08/24/2024 at 03:06PM

11
#23 - tPenguinLTG / @tpenguinltg

06/13/2019 at 05:32AM

11
#24 - albalitz / @_albalitz

06/13/2019 at 11:00AM

11
#25 - James Whitlock / @Keitarusm

06/14/2019 at 02:20PM

11
#26 - JonasS / @jonas42s

06/14/2019 at 08:18PM

11
#27 - ささ / @nick11033

06/19/2019 at 12:10PM

11
#28 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 09:15PM

11
#29 - Hans Lidiki / @HLidiki

09/07/2019 at 06:36PM

11
#30 - Lory / @Lory46845742

11/19/2019 at 08:21AM