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 563368fc3a2bb61edd0128f5

Manual SQL

Change select and insert queries to simulate inserting a new record.

Start file
select * from service where user_id = '908' and service_id = (233);
select * from discounts where user_id = '908';

insert
into discounts values (null, 0, 908, 1, 233, 'STI-0128862-3', '2015-11-20', '2017-11-20', 0, 900, null, now());
End file
select * from service where user_id = '909' and service_id = (322);
select * from discounts where user_id = '909';

insert
into discounts values (null, 0, 909, 2, 322, 'STI-0132580-2', '2015-11-01', '2018-10-01', 0, 136.8, null, now());

View Diff

1,2c1,2
< select * from service where user_id = '908' and service_id = (233);
< select * from discounts where user_id = '908';
---
> select * from service where user_id = '909' and service_id = (322);
> select * from discounts where user_id = '909';
4c4
< insert into discounts values (null, 0, 908, 1, 233, 'STI-0128862-3', '2015-11-20', '2017-11-20', 0, 900, null, now());
---
> insert into discounts values (null, 0, 909, 2, 322, 'STI-0132580-2', '2015-11-01', '2018-10-01', 0, 136.8, null, now());

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 49 remaining solutions by signing in and submitting your own entry
#50 Lukas Matt / @zauberstuhl - Score: 191 - 10/30/15 @ 23:29
:%s//<BS>908/909/g<CR>:<Up><Left><Left><Left><Left><Left><Left><BS><BS><BS>233<Right><Right><Right><Right><BS><BS><BS>322<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Right><BS><BS><BS>1,<Right><Right><Right><Right><BS><BS><BS>2,<CR>:<Up><Left><Left><Left><Left><Left><BS><BS>'STI-0128862-3', '2015-11-20', '2017-11-20', 0, 900,<Right><Right><Right><BS><BS>'STI-0132580-2', '2015-11-01', '2018-10-01', 0, 136.8,<CR>:wq<CR>

0 comments


Created by: @chuckclayton_t1

50 active golfers, 160 entries

Leaderboard (lowest score wins):
66
#31 - mattp (part of the 💉💉💉 club) / @mattpep

05/19/2016 at 09:46PM

66
#32 - Miłosz Łakomy / @foobar01123

01/20/2021 at 10:23AM

68
#33 - Samuel Masuy / @samasuy

10/31/2015 at 09:07PM

71
#34 - Faat / @i_faat

10/30/2015 at 04:06PM

71
#35 - Frederik Klama / @fklama

01/27/2016 at 03:07PM

74
#36 - Eduardo / @earada

10/30/2015 at 01:41PM

74
#37 - Conor Ryan / @conorjryan

11/13/2015 at 07:42AM

74
#38 - RobertT / @techrt2050

01/19/2016 at 06:06AM

74
#39 - James / @Dronak

08/28/2017 at 01:54AM

77
#40 - Phil Ting / @philipjting

11/15/2015 at 07:52AM

78
#41 - Hermit McDermot / @hermit_mcdermot

11/15/2015 at 04:41AM

79
#42 - Sebastian Heil / @sebokopter

10/30/2015 at 06:32PM

81
#43 - Gavin Taqwaa / @chuckclayton_t1

10/30/2015 at 01:20PM

81
#44 - Gerald Tilma / @GeraldTilma

11/01/2015 at 03:19AM

81
#45 - Tj / @yrddy

03/06/2016 at 02:55PM

82
#46 - amol khatri / @khatri_amol

11/01/2015 at 06:11AM

83
#47 - St.аццкий Sovetnik / @st_sovetnik

11/21/2019 at 06:43PM

91
#48 - Ifeoluwa Lawal / @IfeLawl

10/22/2020 at 03:55PM

99
#49 - Craig Hills / @chills42

03/05/2016 at 03:10AM

191
#50 - Lukas Matt / @zauberstuhl

10/30/2015 at 11:29PM