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 by @pieapple03:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @voyeg3r

81 active golfers, 231 entries

Solutions by @pieapple03:
15
#18 - Zhihong Liu / @pieapple03

02/07/2017 at 02:30PM

15
#>18 - Zhihong Liu / @pieapple03

02/07/2017 at 02:33PM

17
#>53 - Zhihong Liu / @pieapple03

02/07/2017 at 02:24PM

18
#>60 - Zhihong Liu / @pieapple03

02/07/2017 at 02:22PM

19
#>66 - Zhihong Liu / @pieapple03

02/07/2017 at 02:18PM

19
#>66 - Zhihong Liu / @pieapple03

02/07/2017 at 02:21PM

20
#>71 - Zhihong Liu / @pieapple03

02/07/2017 at 02:27PM

26
#>78 - Zhihong Liu / @pieapple03

02/07/2017 at 02:16PM