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 4dcd7b572c8e510001000005

Interweave two blocks of text

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

Start file
one
two
three
four
five
six
seven
eight
nine
ten
1
2
3
4
5
6
7
8
9
10
End file
one	1
two	2
three	3
four	4
five	5
six	6
seven	7
eight	8
nine	9
ten	10

View Diff

1,20c1,10
< one
< two
< three
< four
< five
< six
< seven
< eight
< nine
< ten
< 1
< 2
< 3
< 4
< 5
< 6
< 7
< 8
< 9
< 10
---
> one	1
> two	2
> three	3
> four	4
> five	5
> six	6
> seven	7
> eight	8
> nine	9
> ten	10

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 203 remaining solutions by signing in and submitting your own entry
#204 Jurica / @Jurica34581259 - Score: 47 - 12/12/18 @ 12:02
:1,10s/$/\t<CR>1Gqa10j0yw10k$p<Esc>jq9@a:g/^[1-9]/d<CR>ZZ

0 comments


Created by: @mwhooker

204 active golfers, 574 entries

Leaderboard (lowest score wins):
19
#151 - Chris Penkett / @chrispenkett

04/03/2012 at 06:38PM

19
#152 - Mikko Harju / @mikharj

12/01/2012 at 09:37AM

19
#153 - James / @Dronak

09/25/2013 at 11:22PM

19
#154 - cj / @cj01101

01/30/2014 at 10:04PM

19
#155 - Robert / @wrblgbrbl

03/07/2014 at 07:29PM

19
#156 - Rob Glew / @RealGlew

06/12/2014 at 02:36PM

19
#157 - Unreal Name / @morphles

11/23/2014 at 08:29PM

19
#158 - Benny Wong / @bdotdub

05/05/2015 at 04:49PM

19
#159 - ltn614 / @ltn614

09/29/2015 at 02:15PM

19
#160 - Matteo Signer / @MatteoSigner

04/10/2016 at 10:01PM

19
#161 - no / @masongclayton

08/05/2016 at 07:11AM

19
#162 - Nir Givon / @nir_givon

11/08/2018 at 07:21AM

20
#163 - Toon Willems / @nudded

11/27/2011 at 02:13PM

20
#164 - Ronie Uliana / @ronie

02/29/2012 at 09:49PM

20
#165 - Runar / @runarfu

01/12/2013 at 10:10AM

20
#166 - n2o4 / @scatotonic

05/08/2013 at 01:32PM

20
#167 - Piotr Śniegowski / @PiotrSniegowski

06/06/2013 at 02:33PM

20
#168 - brett / @brettyukich

09/26/2013 at 10:21PM

20
#169 - Dennis Dashkevich / @dskecse

12/01/2016 at 10:09AM

20
#170 - Dan / @dstein64

01/27/2019 at 05:09PM

20
#171 - Scott Atkins / @scottrick49

07/29/2021 at 01:01PM

20
#172 - POSIX / @po6ix

02/02/2022 at 01:07PM

21
#173 - James Cash / @jamesnvc

05/14/2011 at 12:46AM

21
#174 - Calvin Condon / @ccondon

01/31/2012 at 05:25AM

21
#175 - Ryan Nevius / @ryannevius

12/18/2018 at 04:03PM

21
#176 - Mickaël Menu / @mickaelmenu

10/25/2020 at 03:42PM

21
#177 - antoine mas / @aneomas

01/09/2021 at 10:23AM

22
#178 - Paweu1kZ nbNeyIhH / @yUQlwsFpRSzxJFh

05/16/2011 at 05:25PM

22
#179 - Mislav Marohnić / @mislav

12/05/2011 at 10:33PM

22
#180 - Tyler / @tylerbindon

04/07/2013 at 12:48AM