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 16 remaining solutions by signing in and submitting your own entry
#17 zma00 / @zma00 - Score: 83 - 09/26/24 @ 00:32
i<50-53>SELECT *<CR>FROM my_table<CR>WHERE id IN (<CR><Esc>[201~<Esc>i<Esc><Esc>q1i    ';<BS><Esc>A',<Esc>j0q9@1xA<CR><BS><BS><BS><BS>)<Esc>:wq<CR>

0 comments


#18 Alex Elarbee / @elarbee - Score: 83 - 09/26/24 @ 02:24
OSELECT<S-> *<CR>FROM<S-> my_table<CR>WHERE id IN (<Esc>j^qq   <Esc>I    '<Esc>A',<Esc>j^q9@qA<BS><Esc>o<BS><BS><BS><BS><BS><CR><BS><BS><BS><BS>)<Esc>ZZ

0 comments


Created by: @pacuna

18 active golfers, 39 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 / @PeppaPi95550250

10/01/2024 at 12:38PM

63
#4 - Adi / @adi2004

09/26/2024 at 07:32AM

63
#5 - MatFriend / @MatFriend

09/27/2024 at 04:01AM

63
#6 - Gustav Kristensen / @gustavkrist

10/01/2024 at 04:46PM

65
#7 - Pablo Acuna / @pacuna

09/25/2024 at 09:56PM

67
#8 - BufferKong / @BufferKong

09/25/2024 at 07:33PM

67
#9 - atlasale / @atlasale

10/02/2024 at 09:50AM

67
#10 - JMTed / @JMTed

10/05/2024 at 03:35PM

67
#11 - romache8 / @romache8

10/08/2024 at 08:37AM

71
#12 - Neix20 / @Neix20

10/01/2024 at 09:41AM

72
#13 - ak@developer / @Ajay-056

09/27/2024 at 06:40AM

73
#14 - nmiller987 / @nmiller987

09/25/2024 at 06:08PM

74
#15 - DayuanX / @DayuanX

10/08/2024 at 10:24AM

75
#16 - Vitalii Solodilov / @mcdoker18

09/28/2024 at 03:41PM

83
#17 - zma00 / @zma00

09/26/2024 at 12:32AM

83
#18 - Alex Elarbee / @elarbee

09/26/2024 at 02:24AM