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 17 remaining solutions by signing in and submitting your own entry
#18 jaccty / @jaccty - Score: 44 - 09/10/24 @ 12:04
:s/local/int/<CR>:s%<BS><BS>%s/"//g<CR>:%s/05/3595/<CR>:wq<CR>

0 comments


Created by: @stoyandimov

18 active golfers, 47 entries

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

09/04/2024 at 06:37PM

22
#2 - Peppa Pig / @PeppaPi95550250

09/06/2024 at 01:13AM

22
#3 - John Braxler / @braxler

09/09/2024 at 05:34PM

23
#4 - Roger Stoltz / @rogsto1

09/06/2024 at 10:06AM

23
#5 - MartnRamtin / @MartnRamtin

09/07/2024 at 03:05PM

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

09/08/2024 at 08:19AM

24
#7 - Valacar / @valacar

09/05/2024 at 02:00AM

24
#8 - Reese / @figadore

09/06/2024 at 05:35PM

25
#9 - penguinwithpants / @penguinwithpants

09/04/2024 at 02:08PM

25
#10 - rhasarub / @rhasarub

09/05/2024 at 08:13AM

25
#11 - Pablo Acuna / @pacuna

09/06/2024 at 01:55AM

25
#12 - no-yan / @no-yan

09/06/2024 at 02:29PM

27
#13 - Stoyan Dimov / @stoyandimov

09/04/2024 at 09:33AM

27
#14 - Anton / @Sobes76rus

09/04/2024 at 06:56PM

28
#15 - Diwakar Singh Parmar / @parmardiwakar150

09/07/2024 at 05:42AM

38
#16 - Nick Glauber / @NickPancakes

09/06/2024 at 06:17PM

39
#17 - mlasal2 / @mlasal2

09/10/2024 at 12:19PM

44
#18 - jaccty / @jaccty

09/10/2024 at 12:04PM