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

Unlock 2 remaining solutions by signing in and submitting your own entry
Created by: @pacuna

29 active golfers, 69 entries

Solutions by @k1mosabe:
67
#19 - k1mosabe / @k1mosabe

12/03/2024 at 12:12AM

87
#>29 - k1mosabe / @k1mosabe

12/03/2024 at 12:05AM