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 80 remaining solutions by signing in and submitting your own entry
#81 Stop and think / @ms_uncountable - Score: 26 - 07/06/17 @ 12:30
5Gf,vfBykpkp8Gf,vfCykpkpZZ

0 comments


#82 Gurukandhamoorthi / @Gurukandhamoor1 - Score: 26 - 07/11/17 @ 14:27
5Gf,y$3Gpu$pjpjjpjprCkrCZZ

0 comments


#83 Jurica / @Jurica34581259 - Score: 26 - 11/20/18 @ 22:50
qa/TES.$<CR>$ma/,<CR>y$`apq4@aZZ

0 comments


Created by: @voyeg3r

83 active golfers, 242 entries

Leaderboard (lowest score wins):
18
#61 - Jan Eisenhauer / @EisenhauerJan

12/21/2016 at 11:17PM

18
#62 - Stephan Bugnon / @stephanbugnon

01/16/2017 at 05:35PM

18
#63 - Joaquin Coronel / @cantstoptheguac

02/09/2017 at 06:25PM

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

02/14/2017 at 05:25PM

18
#65 - Rami Hovi / @hacker_lawyer

05/24/2017 at 12:25AM

18
#66 - Ben Hill / @KaizenSoze70

06/30/2017 at 09:27PM

18
#67 - :wq / @write_quit_22

06/28/2021 at 04:13AM

19
#68 - Hans Yelek / @hans_yelek

01/09/2017 at 06:32AM

19
#69 - Sxcy / @SxcyX

11/06/2018 at 04:33PM

19
#70 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 08:50PM

19
#71 - James / @Dronak

11/07/2022 at 04:49PM

20
#72 - Matti Sairanen / @MattiSairanen

12/18/2016 at 02:51PM

20
#73 - Marcel Akkerman / @MarcelAkkerman

12/21/2016 at 11:30AM

20
#74 - Edouard Piette / @EdPiette

05/11/2017 at 03:11PM

20
#75 - Carl Egbert / @CarlOEgbert

06/14/2017 at 02:51AM

20
#76 - Bradley M. Small / @BradleySmall

11/23/2017 at 01:40AM

21
#77 - Douglas Roper / @dougdroper

12/16/2016 at 02:34PM

23
#78 - Jake Askeland / @JakeAskeland

01/16/2017 at 06:45AM

23
#79 - jonas-grobe / @jonas-grobe

02/03/2024 at 09:43PM

24
#80 - Steve Chernyak / @MrRothstein

12/18/2016 at 04:10PM

26
#81 - Stop and think / @ms_uncountable

07/06/2017 at 12:30PM

26
#82 - Gurukandhamoorthi / @Gurukandhamoor1

07/11/2017 at 02:27PM

26
#83 - Jurica / @Jurica34581259

11/20/2018 at 10:50PM