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 9v0066f44ec20000000003ea

Move list of uuids into a SQL query

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

Start file
26cf42ef-4dbc-4f09-9a80-354e312d207b
35ec0072-059a-4fbe-9396-e35533539a79
6445380c-85ec-4f00-a542-175d7e057d81
c4b5a912-1f4e-4cc1-836b-7a9989e21033
1e6807a8-10c7-47b2-8d1a-e0e8b161e0c6
54a0ca49-274a-4ee0-a276-de678fdda6e8
0d04dbef-1788-4e79-aab4-442b65e353f8
3cdcb0f6-eb68-4495-8783-91f8a3d133d0
d36742bd-70b3-4bff-beb1-657b85a520b0
38841b70-b255-49fa-ada1-29f76981c8e3
End file
SELECT *
FROM my_table
WHERE id IN (
    '26cf42ef-4dbc-4f09-9a80-354e312d207b',
    '35ec0072-059a-4fbe-9396-e35533539a79',
    '6445380c-85ec-4f00-a542-175d7e057d81',
    'c4b5a912-1f4e-4cc1-836b-7a9989e21033',
    '1e6807a8-10c7-47b2-8d1a-e0e8b161e0c6',
    '54a0ca49-274a-4ee0-a276-de678fdda6e8',
    '0d04dbef-1788-4e79-aab4-442b65e353f8',
    '3cdcb0f6-eb68-4495-8783-91f8a3d133d0',
    'd36742bd-70b3-4bff-beb1-657b85a520b0',
    '38841b70-b255-49fa-ada1-29f76981c8e3'
)

View Diff

1,10c1,14
< 26cf42ef-4dbc-4f09-9a80-354e312d207b
< 35ec0072-059a-4fbe-9396-e35533539a79
< 6445380c-85ec-4f00-a542-175d7e057d81
< c4b5a912-1f4e-4cc1-836b-7a9989e21033
< 1e6807a8-10c7-47b2-8d1a-e0e8b161e0c6
< 54a0ca49-274a-4ee0-a276-de678fdda6e8
< 0d04dbef-1788-4e79-aab4-442b65e353f8
< 3cdcb0f6-eb68-4495-8783-91f8a3d133d0
< d36742bd-70b3-4bff-beb1-657b85a520b0
< 38841b70-b255-49fa-ada1-29f76981c8e3
---
> SELECT *
> FROM my_table
> WHERE id IN (
>     '26cf42ef-4dbc-4f09-9a80-354e312d207b',
>     '35ec0072-059a-4fbe-9396-e35533539a79',
>     '6445380c-85ec-4f00-a542-175d7e057d81',
>     'c4b5a912-1f4e-4cc1-836b-7a9989e21033',
>     '1e6807a8-10c7-47b2-8d1a-e0e8b161e0c6',
>     '54a0ca49-274a-4ee0-a276-de678fdda6e8',
>     '0d04dbef-1788-4e79-aab4-442b65e353f8',
>     '3cdcb0f6-eb68-4495-8783-91f8a3d133d0',
>     'd36742bd-70b3-4bff-beb1-657b85a520b0',
>     '38841b70-b255-49fa-ada1-29f76981c8e3'
> )

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 52 remaining solutions by signing in and submitting your own entry
#53 migoohao / @migoohao - Score: 96 - 06/23/25 @ 08:32
qqI    '<End>',<Esc><CR>q@q8@qxo<Esc>i)<Esc>ggO<Esc>sele<BS><BS><BS>select *<Esc>v0Uofrom my_table<Esc>^vawUowhere id in (<Esc>hhvawU^vawUZZ

0 comments


Created by: @pacuna

53 active golfers, 155 entries

Leaderboard (lowest score wins):
57
#1 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

09/27/2024 at 06:34AM

57
#2 - John Braxler / @braxler

09/30/2024 at 03:16PM

57
#3 - Peppa Pig / @PeppaPigSg

10/01/2024 at 12:38PM

57
#4 - Gatsby76(Sloan Yang) / @Sloan-Yang

05/04/2025 at 05:45AM

57
#5 - Damien Baldy / @dbaldy

05/20/2025 at 08:34PM

60
#6 - 0xf00ff00f / @0xf00ff00f

05/15/2025 at 01:36PM

60
#7 - jimmymills / @jimmymills

05/15/2025 at 08:34PM

61
#8 - rasputins / @rasputins

10/19/2024 at 06:43PM

61
#9 - Wim Stockman / @wimstockman

11/10/2024 at 09:54AM

61
#10 - Leon Kacowicz / @leonkacowicz

05/08/2025 at 06:15PM

62
#11 - Zsanett Ferenczi / @ferenczizsani

04/06/2025 at 03:50PM

62
#12 - Yordan Boikov / @yboikov

05/02/2025 at 03:02PM

62
#13 - ElectrifyPro / @ElectrifyPro

05/18/2025 at 11:16PM

63
#14 - Adi / @adi2004

09/26/2024 at 07:32AM

63
#15 - MatFriend / @MatFriend

09/27/2024 at 04:01AM

63
#16 - Gustav Kristensen / @gustavkrist

10/01/2024 at 04:46PM

63
#17 - Håkon Anders Strømsodd / @haakon8855

10/17/2024 at 12:24PM

63
#18 - got_windy / @insomnight

10/21/2024 at 09:35AM

63
#19 - ZEraX4 / @ZEraX4

04/14/2025 at 02:56PM

64
#20 - Anton Strand / @AntonStrand

10/29/2024 at 04:10PM

65
#21 - Pablo Acuna / @pacuna

09/25/2024 at 09:56PM

65
#22 - daniilsvirin / @daniilsvirin

10/16/2024 at 08:35AM

65
#23 - Martin Knoller Stocker / @linuxswords

05/25/2025 at 09:50AM

66
#24 - _3tHeR_ / @3ther-joyboy

11/09/2024 at 03:58PM

66
#25 - greg-asc / @greg-asc

03/04/2025 at 01:07PM

66
#26 - hiro1234omochi / @hiro1234omochi

05/17/2025 at 01:47AM

66
#27 - winter-loo / @winter-loo

05/30/2025 at 05:45AM

67
#28 - BufferKong / @BufferKong

09/25/2024 at 07:33PM

67
#29 - atlasale / @atlasale

10/02/2024 at 09:50AM

67
#30 - JMTed / @JMTed

10/05/2024 at 03:35PM