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

44 active golfers, 114 entries

Leaderboard (lowest score wins):
49
#1 - Lifepillar / @lifepillar

08/17/2016 at 08:18PM

49
#2 - Turkey Man / @lvturkeyman

12/07/2017 at 10:03AM

49
#3 - John Braxler / @braxler

06/18/2019 at 04:05PM

52
#4 - Urtica dioica / @udioica

10/30/2015 at 03:50PM

52
#5 - Jon Krause / @jkrause314

02/06/2016 at 12:08AM

52
#6 - Mister Knister / @vimgolf_ctrl_x

03/04/2016 at 12:38PM

52
#7 - Pedro Santos / @pedrosans

07/20/2016 at 03:40AM

52
#8 - 조성식 / @Y9eKW0qxvsdIN6W

03/26/2021 at 03:57AM

53
#9 - Michel Ganguin / @tinycrazyfish

03/03/2016 at 12:59PM

53
#10 - Dimitar Dimitrov / @kurkale6ka

03/18/2016 at 05:08PM

54
#11 - mnx / @mnxx

11/15/2015 at 04:57PM

56
#12 - Tim Chase / @gumnos

10/30/2015 at 02:06PM

56
#13 - Smylers / @Smylers2

10/30/2015 at 03:06PM

56
#14 - Ben Harris / @bharrisau

11/01/2015 at 03:43AM

57
#15 - Chenut Ludovic / @7Brwa7

04/08/2016 at 08:52AM

58
#16 - Árpád Krejczinger / @krarpi

10/30/2015 at 02:57PM

58
#17 - Daniel K. / @lan4k

10/31/2015 at 08:11PM

59
#18 - Jonas Nockert / @lemonad

10/31/2015 at 09:41PM

59
#19 - Pete Sevander / @Sevanteri

11/11/2015 at 10:26AM

60
#20 - Paulo H Baumann / @PauloBaumann

11/02/2015 at 01:25PM

65
#21 - Chong Kim / @chong_oh_kim

10/31/2015 at 11:14PM

65
#22 - Walker Boh / @walker_boh

11/04/2015 at 08:40AM

65
#23 - Ben Hill / @KaizenSoze70

05/09/2016 at 10:35PM

65
#24 - Raymond Chee / @rchomium

03/05/2017 at 04:51PM

66
#25 - mattp (part of the 💉💉💉 club) / @mattpep

05/19/2016 at 09:46PM

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

01/20/2021 at 10:23AM

68
#27 - Samuel Masuy / @samasuy

10/31/2015 at 09:07PM

71
#28 - Faat / @i_faat

10/30/2015 at 04:06PM

71
#29 - Frederik Klama / @fklama

01/27/2016 at 03:07PM

74
#30 - Eduardo / @earada

10/30/2015 at 01:41PM