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 59e19a18396b000053000013

Converting group lines from format A to Format B

Convert from one format to another

Start file
ABCDEFGHIJKL        00100     C                    N12345678W1234567891234       GND   99999MMY LITTLE TEST                000000000
ABCDEFGHIJKL        
00100     H N12345678W123456789                              GND   99999MANOTHER LITTLE TEST           000000000
ABCDEFGHIJKL        
00200     L N12345678W123456789N12345678W12345678912341234                                             000000000
ABCDEFGHIJKL        
00300     G N12345678W123456789
End file
0010|C|||N12345678|W123456789|123.4
0010|H|N12345678|W123456789||
0020|L|N12345678|W123456789|N12345678|W123456789|123.4|123.4
0030|G|N12345678|W123456789||

View Diff

1,4c1,4
< ABCDEFGHIJKL        00100     C                    N12345678W1234567891234       GND   99999MMY LITTLE TEST                000000000
< ABCDEFGHIJKL        00100     H N12345678W123456789                              GND   99999MANOTHER LITTLE TEST           000000000
< ABCDEFGHIJKL        00200     L N12345678W123456789N12345678W12345678912341234                                             000000000
< ABCDEFGHIJKL        00300     G N12345678W123456789
---
> 0010|C|||N12345678|W123456789|123.4
> 0010|H|N12345678|W123456789||
> 0020|L|N12345678|W123456789|N12345678|W123456789|123.4|123.4
> 0030|G|N12345678|W123456789||
\ No newline at end of file

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 11 remaining solutions by signing in and submitting your own entry
#12 slicklash / @slicklash - Score: 87 - 08/23/18 @ 13:54
<C-Q>Lt0xe<C-Q>LtGc|<Esc>ll<C-Q>3jr|<Esc>i||<Esc>lldwqqf8a|<Esc>f9.q<CR>@q<CR>@@@@f3a.<Esc>la|<Esc>f3a.<Esc>llD<CR>@@A|<Esc>2ki|<Esc>lDkf Di.<Esc>ZZ

0 comments


Created by: @charlieoconor

12 active golfers, 27 entries

Leaderboard (lowest score wins):
56
#1 - "Smylers" / @Smylers2

10/20/2017 at 07:44AM

56
#2 - John Braxler / @braxler

10/20/2017 at 02:08PM

56
#3 - Peppa Pig / @PeppaPigSg

07/02/2024 at 08:39AM

68
#4 - tPenguinLTG / @tpenguinltg

10/14/2017 at 05:05PM

72
#5 - Michael Herring / @mayoroftuesday

11/02/2017 at 05:00PM

72
#6 - nickGPT / @nickandbro

08/27/2024 at 05:24AM

73
#7 - Saki Gw / @Sakigw

10/18/2017 at 12:54PM

73
#8 - Markus / @dayshade_7

10/19/2017 at 09:51AM

80
#9 - Pfhor / @PfhorShark

10/27/2017 at 09:56PM

82
#10 - Mihai / @mihaicristiant

11/01/2017 at 12:29PM

84
#11 - Bradley M. Small / @BradleySmall

11/22/2017 at 07:21PM

87
#12 - slicklash / @slicklash

08/23/2018 at 01:54PM