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):
16
#31 - Kai Yuan / @kentyuan

12/16/2016 at 04:26PM

16
#32 - retro / @tryphopp

12/19/2016 at 10:17PM

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

04/10/2017 at 02:09PM

16
#34 - Bill Ruddock / @biinari

05/03/2017 at 09:56PM

16
#35 - Mihai / @mihaicristiant

01/29/2019 at 09:37AM

16
#36 - Lory / @Lory46845742

12/10/2019 at 03:07PM

16
#37 - Jon Krause / @jkrause314

12/20/2020 at 04:12AM

16
#38 - Jean George / @JeanGeo20504212

03/21/2022 at 01:09PM

16
#39 - Alex / @AlexanderHeatl2

07/07/2022 at 06:46PM

16
#40 - z00master / @z00master

09/02/2022 at 04:20PM

16
#41 - キムラ・OPEL・ユウジ / @kimurayuuji79

11/07/2022 at 03:43AM

16
#42 - moh ayaya / @AyayaMoh

09/27/2023 at 05:16PM

16
#43 - Luoyb / @Luoyb

11/17/2023 at 06:09AM

17
#44 - Michał Dytko / @DytkoM

12/16/2016 at 02:18PM

17
#45 - Cristian Lupașcu / @clupasq

12/16/2016 at 03:08PM

17
#46 - Aeden Jameson / @daliful

12/17/2016 at 08:02AM

17
#47 - Nessig / @Nessig5

12/18/2016 at 01:42AM

17
#48 - Craig Langford / @cllangfo

12/18/2016 at 01:08PM

17
#49 - Peter Chynoweth / @pcchynoweth

12/20/2016 at 12:52AM

17
#50 - Mattias GABRIEL / @matou008

12/20/2016 at 04:05PM

17
#51 - John lolcats Manst / @lolcatsman

12/21/2016 at 08:29AM

17
#52 - Andrew Lewis / @alew_is

12/21/2016 at 04:09PM

17
#53 - Anton / @stalheiman

12/22/2016 at 02:40PM

17
#54 - Patrick Sanan / @patricksanan

01/08/2017 at 01:59PM

17
#55 - Social Botolinum / @SocialBot4

01/09/2017 at 11:07AM

17
#56 - eban / @eban

02/17/2017 at 01:00PM

17
#57 - Yann / @yannstad

02/20/2017 at 08:38AM

17
#58 - Daniel / @Daniel00288663

03/22/2017 at 08:26AM

17
#59 - Alex Linden / @alexwlinden1

04/25/2017 at 02:00PM

17
#60 - Brian Hall / @_bruab_

05/10/2017 at 01:05PM