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 5f1e0217becb80000692b9c4

Rural Post

Simple challenge to remove all but the post code on each line

Start file
RD 5 Gore 9775
RD 6 Gore 9776
RD 7 Gore 9777
RD 1 Great Barrier Island 0991
RD 1 Greta Valley 7387
RD 1 Greytown 5794
RD 1 Hamilton 3281
RD 2 Hamilton 3282
End file
9775
9776
9777
0991
7387
5794
3281
3282

View Diff

1,8c1,8
< RD 5 Gore 9775
< RD 6 Gore 9776
< RD 7 Gore 9777
< RD 1 Great Barrier Island 0991
< RD 1 Greta Valley 7387
< RD 1 Greytown 5794
< RD 1 Hamilton 3281
< RD 2 Hamilton 3282
---
> 9775
> 9776
> 9777
> 0991
> 7387
> 5794
> 3281
> 3282

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 937 remaining solutions by signing in and submitting your own entry
#938 yuhung / @koba_taiwan - Score: 349 - 12/25/20 @ 05:31
<Esc><Esc><Esc><0xef><0xbc><0x9a><0xef><0xbc><0x81><Esc><0xe3><0x84><0xa8><0xe3><0x84><0x9c><Esc>jjjjjjj<Esc>:1<BS>1,$s/<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><Esc>kkkkkkkkkkkkkkk0<Esc><Esc>:%s/&<BS>^.//<CR><Esc>u<Esc>:%s/<Esc><Esc>:q!<BS><BS><BS><Esc>kjjjjjjjjjjjj<Esc><Esc><Esc>kkkkkkkkkkkkkkkkkk<C-V>jjjjjjjllkkkkkkkllllll<Esc>kjjkk0<Esc>:%s/[]<Left>^_s*<Right>(<BS>*<Esc>k<Esc>:s/<BS><BS>%s/<BS><BS><BS>%s/<Esc>kklllllllllllllllllllllljkA<Esc>jjkk<Esc>/<Esc>:s<BS>%s//s<BS><BS>\/s<BS><BS><BS>/s<BS><BS>/t<BS><BS>\_s<BS><BS>s<BS><BS>[]<Left>^\s<Right>*]<BS>\n<BS><BS><BS><Left><Left><Left><Left><Left>*<BS>.*<Right><Right><Right><Right><Left><Left><Right><Right><BS>n<Left><Right><Right>*<BS><Left><Left><Left><BS><Right><Right><BS>s<Right><Left><Left><Left><Left><BS><BS><Right><Right><Right><Right><BS><BS><BS><BS>\s<Left><Left>.*<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>//g<CR><Esc>:wq!<CR>

0 comments


Created by: @ctmusicnz

938 active golfers, 3797 entries

Leaderboard (lowest score wins):
9
#31 - Cláudio Caseiro / @ccaseiro

10/15/2020 at 03:33AM

9
#32 - Dmitry Antonyuk / @AntonyukDmitry

10/15/2020 at 07:05AM

9
#33 - Eduardo / @earada

10/15/2020 at 07:03PM

9
#34 - versa / @versa51547979

10/16/2020 at 06:54PM

9
#35 - Thanawat Yodnil / @littleboycoding

10/17/2020 at 06:54AM

9
#36 - Aleks Kissinger / @AleksKissinger

10/18/2020 at 07:12PM

9
#37 - dotvimrc / @dotvimrc1

10/19/2020 at 06:47AM

9
#38 - Henry MATHEISEN / @hmatheisen

10/20/2020 at 01:56PM

9
#39 - Leland Paul Kusmer / @lelandpaul

10/20/2020 at 02:00PM

9
#40 - Hossein Yousefi 💙 / @u_hossein

10/20/2020 at 05:24PM

9
#41 - Jakub Wagner / @Jakub1019

10/22/2020 at 09:56AM

9
#42 - LeCodeurFou / @le_codeur

10/23/2020 at 12:50PM

9
#43 - John Watson / @JRWats0n

10/24/2020 at 06:25AM

9
#44 - TW / @tangw

10/24/2020 at 04:21PM

9
#45 - Alex / @SaidTheAlex

10/25/2020 at 06:22AM

9
#46 - Ravi S Sinha / @ambidextrousTx

10/26/2020 at 11:42PM

9
#47 - Petter Wichman / @petterwichman

10/27/2020 at 09:43AM

9
#48 - Andrzej Wąsowski / @AndrzejWasowski

10/29/2020 at 12:20PM

9
#49 - r4d1um / @r4d1um

10/29/2020 at 10:20PM

9
#50 - dahan / @dahan74265266

10/30/2020 at 06:05AM

9
#51 - Bajok / @b410k

11/01/2020 at 12:42AM

9
#52 - daniao / @dan1ao

11/01/2020 at 12:26PM

9
#53 - Demian Martinez / @demianuco

11/01/2020 at 10:17PM

9
#54 - Joseph Simone / @averagejoey2000

11/02/2020 at 11:43PM

9
#55 - Daedren / @Daedren

11/04/2020 at 09:58AM

9
#56 - Cornelius Roemer / @CorneliusRoemer

11/04/2020 at 06:40PM

9
#57 - MrRubiksSC / @RubiksSc

11/07/2020 at 10:51PM

9
#58 - Song Zheng / @songz

11/11/2020 at 06:53AM

9
#59 - Wayne / @lilwayne15561

11/14/2020 at 03:48AM

9
#60 - David Kutschke / @D4KU_

11/14/2020 at 12:14PM