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 34 remaining solutions by signing in and submitting your own entry
#35 M S Dheeraj Murthy / @Dheeraj-Murthy - Score: 58 - 09/13/24 @ 13:26
:s/local/int<CR>jvi(:s/|%<BS><BS><BS>/\%V"0/359/g<CR>vi(:s/|<BS>\%V"//g<CR>:wq<CR>

0 comments


Created by: @stoyandimov

35 active golfers, 105 entries

Leaderboard (lowest score wins):
38
#31 - Nick Glauber / @NickPancakes

09/06/2024 at 06:17PM

39
#32 - mlasal2 / @mlasal2

09/10/2024 at 12:19PM

42
#33 - Davida Berto / @davida929

09/13/2024 at 01:16AM

44
#34 - jaccty / @jaccty

09/10/2024 at 12:04PM

58
#35 - M S Dheeraj Murthy / @Dheeraj-Murthy

09/13/2024 at 01:26PM