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 5853f052854f48716101cc70

replace 2nd column blanks with values in same column if blank

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

Start file
TEST,SOMELOG
TESA,SOMELOGA
TESB
TESC
TESD,SOMELOGB
TESE
TESF
TESG,SOMELOGC
End file
TEST,SOMELOG
TESA,SOMELOGA
TESB,SOMELOGB
TESC,SOMELOGB
TESD,SOMELOGB
TESE,SOMELOGC
TESF,SOMELOGC
TESG,SOMELOGC

View Diff

3,4c3,4
< TESB
< TESC
---
> TESB,SOMELOGB
> TESC,SOMELOGB
6,7c6,7
< TESE
< TESF
---
> TESE,SOMELOGC
> TESF,SOMELOGC

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 Stephan Bugnon / stephanbugnon - Score: 18 - 01/16/17 @ 17:35
G$qqF,y$kpkpqk@qZZ

0 comments

#45 Joaquin Coronel / joakonumberone - Score: 18 - 02/09/17 @ 18:25
Gwqqy$kpkpqkF,@qZZ

0 comments

#46 Cù Hữu Hoàng / Cuhuuhoang - Score: 18 - 02/14/17 @ 17:25
Gqq0f,yekpkpkq@qZZ

0 comments

#47 Rami Hovi / hacker_lawyer - Score: 18 - 05/24/17 @ 00:25
Gwy$kpkp5by$kpkpZZ

0 comments

#48 Hans Yelek / hans_yelek - Score: 19 - 01/09/17 @ 06:32
4jwyekpkpGwyekpkpZZ

0 comments

#49 Matti Sairanen / MattiSairanen - Score: 20 - 12/18/16 @ 14:51
jjA,S<C-N><Esc>j.jja,S<C-N><Esc>j.ZZ

0 comments

#50 Marcel Akkerman / MarcelAkkerman - Score: 20 - 12/21/16 @ 11:30
3GA,S<C-N><Esc>j.jj.j.rCk.ZZ

0 comments

#51 Edouard Piette / EdPiette - Score: 20 - 05/11/17 @ 15:11
Gf,y$kpkpkF,y$kpkpZZ

0 comments

#52 Douglas Roper / dougdroper - Score: 21 - 12/16/16 @ 14:34
3GA,S<C-N><Esc>j.jj.j.<C-V>krC<Esc>ZZ

0 comments

#53 Jake Askeland / JakeAskeland - Score: 23 - 01/16/17 @ 06:45
4jf,y$kpkpGf,y$kpkp:wq<CR>

0 comments

#54 Steve Chernyak / MrRothstein - Score: 24 - 12/18/16 @ 16:10
jqa3jf,y$kpkp^2jq@a<Esc>:wq<CR>

0 comments

Created by: voyeg3r

54 active golfers, 153 entries

Leaderboard (lowest score wins):
15
#1 - Urtica dioica / udioica

12/16/2016 at 11:13PM

15
#2 - Saki Gw / Sakigw

12/17/2016 at 12:01AM

15
#3 - Andrew Huang / TDAlgory

12/18/2016 at 07:29AM

15
#4 - Christian Guenter / chris_guenter

12/18/2016 at 12:53PM

15
#5 - Majo / majodurco

12/18/2016 at 04:24PM

15
#6 - Cody F H / codyfh

12/18/2016 at 05:16PM

15
#7 - chocolate / chocola81394123

12/19/2016 at 07:15PM

15
#8 - John Braxler / braxler

12/19/2016 at 07:16PM

15
#9 - Constantine / ConstantineHatz

12/19/2016 at 10:25PM

15
#10 - Sergey Fedorov / Shade30

12/20/2016 at 10:02AM

15
#11 - thejojo87 / thejojo1987

12/20/2016 at 11:56PM

15
#12 - onedayrex / onedayzns

12/23/2016 at 08:11AM

15
#13 - さよきみ / MrIn1121

12/23/2016 at 03:19PM

15
#14 - Smylers / Smylers2

12/28/2016 at 07:03AM

15
#15 - Remus Dalrymple / bornintheflames

12/30/2016 at 10:52PM

15
#16 - Marcin / Marcin89439917

12/30/2016 at 11:03PM

15
#17 - Assaf Lavie / AssafLavie

01/01/2017 at 08:00PM

15
#18 - Zhihong Liu / pieapple03

02/07/2017 at 02:30PM

15
#19 - Alexander Bessonov / nonsleepr

03/15/2017 at 09:19PM

15
#20 - Ilya Shakirov / aelaau

03/22/2017 at 09:26AM

15
#21 - 梧桐王子 / WutongYujie

05/04/2017 at 12:47PM

16
#22 - Kai Yuan / kentyuan

12/16/2016 at 04:26PM

16
#23 - retro / tryphopp

12/19/2016 at 10:17PM

16
#24 - Миша Сорокин / rafmikovi4

04/10/2017 at 02:09PM

16
#25 - Bill Ruddock / biinari

05/03/2017 at 09:56PM

17
#26 - Michał Dytko / DytkoM

12/16/2016 at 02:18PM

17
#27 - Cristian Lupașcu / clupasq

12/16/2016 at 03:08PM

17
#28 - Aeden Jameson / daliful

12/17/2016 at 08:02AM

17
#29 - Nessig / Nessig5

12/18/2016 at 01:42AM

17
#30 - Craig Langford / cllangfo

12/18/2016 at 01:08PM

17
#31 - Peter Chynoweth / pcchynoweth

12/20/2016 at 12:52AM

17
#32 - Mattias GABRIEL / matou008

12/20/2016 at 04:05PM

17
#33 - John lolcats Manst / lolcatsman

12/21/2016 at 08:29AM

17
#34 - Andrew Lewis / droosec

12/21/2016 at 04:09PM

17
#35 - Anton / stalheiman

12/22/2016 at 02:40PM

17
#36 - Patrick Sanan / patricksanan

01/08/2017 at 01:59PM

17
#37 - Social Botolinum / SocialBot4

01/09/2017 at 11:07AM

17
#38 - eban / eban

02/17/2017 at 01:00PM

17
#39 - Yann / yannstadnicki

02/20/2017 at 08:38AM

17
#40 - Daniel / Daniel00288663

03/22/2017 at 08:26AM

17
#41 - Alex Linden / alexwlinden1

04/25/2017 at 02:00PM

17
#42 - Brian Hall / _bruab_

05/10/2017 at 01:05PM

18
#43 - Jan Eisenhauer / EisenhauerJan

12/21/2016 at 11:17PM

18
#44 - Stephan Bugnon / stephanbugnon

01/16/2017 at 05:35PM

18
#45 - Joaquin Coronel / joakonumberone

02/09/2017 at 06:25PM

18
#46 - Cù Hữu Hoàng / Cuhuuhoang

02/14/2017 at 05:25PM

18
#47 - Rami Hovi / hacker_lawyer

05/24/2017 at 12:25AM

19
#48 - Hans Yelek / hans_yelek

01/09/2017 at 06:32AM

20
#49 - Matti Sairanen / MattiSairanen

12/18/2016 at 02:51PM

20
#50 - Marcel Akkerman / MarcelAkkerman

12/21/2016 at 11:30AM

20
#51 - Edouard Piette / EdPiette

05/11/2017 at 03:11PM

21
#52 - Douglas Roper / dougdroper

12/16/2016 at 02:34PM

23
#53 - Jake Askeland / JakeAskeland

01/16/2017 at 06:45AM

24
#54 - Steve Chernyak / MrRothstein

12/18/2016 at 04:10PM