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 39 remaining solutions by signing in and submitting your own entry
#40 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

40 active golfers, 93 entries

Leaderboard (lowest score wins):
74
#31 - James / @Dronak

08/28/2017 at 01:54AM

77
#32 - Phil Ting / @philipjting

11/15/2015 at 07:52AM

78
#33 - kris / @0xkrp

11/15/2015 at 04:41AM

79
#34 - Sebastian Heil / @sebokopter

10/30/2015 at 06:32PM

81
#35 - Gavin Taqwaa / @chuckclayton_t1

10/30/2015 at 01:20PM

81
#36 - Gerald Tilma / @GeraldTilma

11/01/2015 at 03:19AM

81
#37 - Tj / @yrddy

03/06/2016 at 02:55PM

82
#38 - amol khatri / @khatri_amol

11/01/2015 at 06:11AM

99
#39 - Craig Hills / @chills42

03/05/2016 at 03:10AM

191
#40 - Lukas Matt / @zauberstuhl

10/30/2015 at 11:29PM