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

Search different SQL column with similar where clause

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

Start file
SELECT * FROM numbers WHERE local_number IN (
       
"058307327",
       
"058307328",
       
"058307329"
)
End file
SELECT * FROM numbers WHERE int_number IN (
       
35958307327,
       
35958307328,
       
35958307329
)

View Diff

1,4c1,4
< SELECT * FROM numbers WHERE local_number IN (
<       "058307327",
<       "058307328",
<       "058307329"
---
> SELECT * FROM numbers WHERE int_number IN (
>       35958307327,
>       35958307328,
>       35958307329

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 53 remaining solutions by signing in and submitting your own entry
#54 Badita Marin-Georgian / @GeorgianBadita - Score: 68 - 11/19/24 @ 23:04
:<Up><Up><Up><Up>%s/:<BS>"0\(\d\!<BS>+\):<BS>"/359\1)<BS>/g<CR>:/_<CR>i<BS><Esc>nnNNnnnis<BS><BS><BS><BS><BS><BS>int<Esc>:w<CR>:q<CR>

0 comments


Created by: @stoyandimov

54 active golfers, 220 entries

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

09/04/2024 at 06:37PM

22
#2 - Peppa Pig / @PeppaPigSg

09/06/2024 at 01:13AM

22
#3 - John Braxler / @braxler

09/09/2024 at 05:34PM

22
#4 - Petro Тrouq / @zulolosi

09/23/2024 at 03:34AM

22
#5 - MatFriend / @MatFriend

09/23/2024 at 11:03PM

22
#6 - mau-mauricelim / @mau-mauricelim

09/26/2024 at 06:34AM

22
#7 - Brett Collins / @brett-collins_cbhq

10/03/2024 at 06:43PM

22
#8 - dlum20 / @dlum20

10/10/2024 at 01:37AM

22
#9 - rasputins / @rasputins

10/21/2024 at 05:18PM

22
#10 - got_windy / @insomnight

10/23/2024 at 12:32AM

22
#11 - Wim Stockman / @wimstockman

11/10/2024 at 05:18PM

22
#12 - Anton Savelyev / @PoiXP

01/02/2025 at 03:19AM

22
#13 - Abdelrahman Madkour / @a3madkour

04/07/2025 at 11:48AM

23
#14 - Roger Stoltz / @rogsto1

09/06/2024 at 10:06AM

23
#15 - MartnRamtin / @MartnRamtin

09/07/2024 at 03:05PM

23
#16 - ak@developer / @Ajay-056

09/08/2024 at 08:19AM

23
#17 - maruryota / @maruryota

09/12/2024 at 05:06AM

23
#18 - Janusz Spatz / @janusz-anue

09/13/2024 at 11:44AM

23
#19 - ばやし / @shin5884_kt

09/15/2024 at 02:53AM

23
#20 - Neix20 / @Neix20

10/03/2024 at 02:34AM

23
#21 - OisinWard / @OisinWard

11/19/2024 at 04:25PM

24
#22 - Valacar / @valacar

09/05/2024 at 02:00AM

24
#23 - Reese / @figadore

09/06/2024 at 05:35PM

25
#24 - penguinwithpants / @penguinwithpants

09/04/2024 at 02:08PM

25
#25 - rhasarub / @rhasarub

09/05/2024 at 08:13AM

25
#26 - Pablo Acuna / @pacuna

09/06/2024 at 01:55AM

25
#27 - no-yan / @no-yan

09/06/2024 at 02:29PM

25
#28 - x03n046 / @x03n046

09/19/2024 at 06:38AM

25
#29 - Chloe Brett / @chloebrett

11/10/2024 at 09:40AM

26
#30 - Casey O'Donnell / @CaseyOD15519082

09/16/2024 at 04:23PM