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 32 remaining solutions by signing in and submitting your own entry
#33 kris / 0xkrp - Score: 78 - 11/15/15 @ 04:41
f8*<C-A>n<C-A>n<C-A>f3*89<C-A>n./1,<CR><C-A>f03718<C-X>bi0<Esc>eee<C-X><C-A><C-A>EEhh19<C-A>i0<Esc>www<C-A>2w<C-X><C-A><C-A>ww19<C-A>i0<Esc><Esc>2Wcw136.8<Esc>ZZ

0 comments

#34 Sebastian Heil / sebokopter - Score: 79 - 10/30/15 @ 18:32
f8<C-A>f2x<C-X>ypylpjF8<C-A>jjhh.f1.f2x<C-X>ylpf2R32580-2<Esc>f2;xa1<Esc>f7<C-A>3lr02lxa1<Esc>f9dwi126<BS><BS>36.8<Esc>ZZ

0 comments

#35 Gavin Taqwaa / chuckclayton_t1 - Score: 81 - 10/30/15 @ 13:20
:%s/08/09<CR>f1r2f2R322f2<C-H><C-H><Esc>f2R32580-2f2<C-H><C-H><Esc>f2;R01<Esc>f7R8-10-01<Esc>f9ciw136.8<Esc>3khci)322<Esc>ZZ

0 comments

#36 Gerald Tilma / GeraldTilma - Score: 81 - 11/01/15 @ 03:19
:%s/908/909/g<CR>:%s/233/322/g<CR>f1r2f1lcw32580<Esc>llr2f2f2xa1<Esc>f7r83lr0f2xa1<Esc>f9cw136.8<Esc>ZZ

0 comments

#37 Tj / yrddy - Score: 81 - 03/06/16 @ 14:55
:%s/8/r/<BS><BS>9/g<CR>:%s/233/322/g<CR>f1r2f0llct'32580-2<Esc>EE2bxa1<Esc>f7r82ect'0-01<Esc>2Wcw136.8<Esc>ZZ

0 comments

#38 amol khatri / khatri_amol - Score: 82 - 11/01/15 @ 06:11
:%s/08/09<CR>f1r22f2R32580<Esc>f3r22f2R01<Esc>f7r82f1r0f2R01<Esc>:%s/900/136.8<CR>:%s/233/322<CR><Esc>:wqa<CR>

0 comments

#39 Craig Hills / chills42 - Score: 99 - 03/05/16 @ 03:10
f8r9f2i32<Esc>llxxf8jF8r9jjbhr9wwr2wwi32<Right><Right><BS><Esc><Right>xf0<Right><Right>c/'<CR>32580-2<Esc>/-2<CR>cw<Right><Right><BS><BS>-01<Esc>f7r8lllr0llxa1<Esc>f9cw136.8<Esc>ZZ

0 comments

#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, 92 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

51
#3 - John Braxler / braxler

11/09/2015 at 07:21PM

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

53
#8 - Michel Ganguin / tinycrazyfish

03/03/2016 at 12:59PM

53
#9 - Dimitar Dimitrov / kurkale6ka

03/18/2016 at 05:08PM

54
#10 - mnx / mnxx

11/15/2015 at 04:57PM

56
#11 - Tim Chase / gumnos

10/30/2015 at 02:06PM

56
#12 - Smylers / Smylers2

10/30/2015 at 03:06PM

56
#13 - Ben Harris / bharrisau

11/01/2015 at 03:43AM

57
#14 - Chenut Ludovic / 7Brwa7

04/08/2016 at 08:52AM

58
#15 - Árpád Krejczinger / krarpi

10/30/2015 at 02:57PM

58
#16 - Daniel K. / lan4k

10/31/2015 at 08:11PM

59
#17 - Jonas Nockert / lemonad

10/31/2015 at 09:41PM

59
#18 - Pete Sevander / Sevanteri

11/11/2015 at 10:26AM

60
#19 - Paulo H Baumann / PauloBaumann

11/02/2015 at 01:25PM

65
#20 - Chong Kim / chong_oh_kim

10/31/2015 at 11:14PM

65
#21 - Walker Boh / walker_boh

11/04/2015 at 08:40AM

65
#22 - Ben Hill / KaizenSoze70

05/09/2016 at 10:35PM

65
#23 - Raymond Chee / rchomium

03/05/2017 at 04:51PM

66
#24 - some call me mattp / mattpep

05/19/2016 at 09:46PM

68
#25 - Samuel Masuy / samasuy

10/31/2015 at 09:07PM

71
#26 - Faat / i_faat

10/30/2015 at 04:06PM

71
#27 - Frederik Klama / fklama

01/27/2016 at 03:07PM

74
#28 - Eduardo / earada

10/30/2015 at 01:41PM

74
#29 - Conor Ryan / conorjryan

11/13/2015 at 07:42AM

74
#30 - RobertT / techrt2050

01/19/2016 at 06:06AM

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