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):
48
#1 - Jean George / @JeanGeo20504212

10/29/2023 at 02:28PM

48
#2 - Peppa Pig / @PeppaPi95550250

07/03/2024 at 01:35AM

48
#3 - nickGPT / @nickandbro

08/28/2024 at 03:50AM

49
#4 - Lifepillar / @lifepillar

08/17/2016 at 08:18PM

49
#5 - Turkey Man / @lvturkeyman

12/07/2017 at 10:03AM

49
#6 - John Braxler / @braxler

06/18/2019 at 04:05PM

52
#7 - Urtica dioica / @udioica

10/30/2015 at 03:50PM

52
#8 - Jon Krause / @jkrause314

02/06/2016 at 12:08AM

52
#9 - Mister Knister / @vimgolf_ctrl_x

03/04/2016 at 12:38PM

52
#10 - Pedro Santos / @pedrosans

07/20/2016 at 03:40AM

52
#11 - 조성식 / @Y9eKW0qxvsdIN6W

03/26/2021 at 03:57AM

53
#12 - Michel Ganguin / @tinycrazyfish

03/03/2016 at 12:59PM

53
#13 - Dimitar Dimitrov / @kurkale6ka

03/18/2016 at 05:08PM

54
#14 - mnx / @mnxx

11/15/2015 at 04:57PM

54
#15 - jonas-grobe / @jonas-grobe

02/04/2024 at 12:06PM

54
#16 - かみひろ / @km_hr

03/10/2024 at 07:42AM

55
#17 - constap / @constap

05/09/2024 at 12:58PM

56
#18 - Tim Chase / @gumnos

10/30/2015 at 02:06PM

56
#19 - Smylers / @Smylers2

10/30/2015 at 03:06PM

56
#20 - Ben Harris / @bharrisau

11/01/2015 at 03:43AM

57
#21 - Chenut Ludovic / @7Brwa7

04/08/2016 at 08:52AM

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

10/30/2015 at 02:57PM

58
#23 - Daniel K. / @lan4k

10/31/2015 at 08:11PM

59
#24 - Jonas Nockert / @lemonad

10/31/2015 at 09:41PM

59
#25 - Pete Sevander / @Sevanteri

11/11/2015 at 10:26AM

60
#26 - Paulo H Baumann / @PauloBaumann

11/02/2015 at 01:25PM

65
#27 - Chong Kim / @chong_oh_kim

10/31/2015 at 11:14PM

65
#28 - Walker Boh / @walker_boh

11/04/2015 at 08:40AM

65
#29 - Ben Hill / @KaizenSoze70

05/09/2016 at 10:35PM

65
#30 - Raymond Chee / @rchomium

03/05/2017 at 04:51PM