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.
#94 Chris Penkett / @chrispenkett - Score: 19 - 04/03/12 @ 11:38
:g/\d/1m-|s/\n/<Tab><CR>ZZ
0 comments
#96 Toon Willems / @nudded - Score: 20 - 11/27/11 @ 06:13
qqGdd9kA<Tab><Esc>pi<BS><Esc>q9@qZZ
0 comments
#100 James Cash / @jamesnvc - Score: 21 - 05/13/11 @ 17:46
qq11Gdd<C-O>A<Tab><C-R>"<BS><Esc>jq9@qZZ
0 comments
#101 Calvin Condon / @ccondon - Score: 21 - 01/30/12 @ 21:25
qa11Gdd''pi<BS><Tab><Esc>jq9@aZZ
0 comments
#102 Paweu1kZ nbNeyIhH / @yUQlwsFpRSzxJFh - Score: 22 - 05/16/11 @ 10:25
qq11Gdd``A<Tab><C-R>"<BS><Esc>jq9@qZZ
0 comments
#103 Mislav Marohnić / @mislav - Score: 22 - 12/05/11 @ 14:33
qqA<Tab><Esc>11Gdd''pkJ+q9@qZZ
0 comments
#104 Tyler Bindon / @tylerbindon - Score: 22 - 04/06/13 @ 17:48
qq:+10t.<CR>-Jr<Tab>jq9@qd}ZZ
0 comments
#105 Michael Jin / @nijleahcim - Score: 23 - 03/11/12 @ 17:56
11G<C-V>G$y<C-V>gg$A<Tab><Esc>$p11GdGZZ
0 comments
#106 Jacek Wysocki / @ex00 - Score: 23 - 06/14/12 @ 05:22
A<Tab>1<Esc>qqywjA<Tab><C-R>"<Esc><C-A>q9@qdGZZ
0 comments
#107 Chris Brown / @engineercyb - Score: 23 - 09/12/12 @ 18:21
qq10jY10kpkJr<Tab>jq9@qdGZZ
0 comments
#108 Daniel Erlandsson / @danneerlandsson - Score: 24 - 11/21/11 @ 11:42
qq10jdw10kA<Tab><Esc>pj0q9@QdGZZ
0 comments
#109 Matt Donahoe / @mdonahoe - Score: 26 - 10/12/11 @ 22:37
qqdd9jPJ1Gq9@q:5<BS>%s/ /<Tab><CR>ZZ
0 comments
#110 Alex Hammel / @AlexJHammel - Score: 26 - 12/24/12 @ 11:35
qq10jD10kA<Tab><Esc>pjq9@qdGwi1<Esc>ZZ
0 comments
#111 Vojtěch Šívr / @VojtechSivr - Score: 30 - 06/09/11 @ 12:54
qa<k1><k0>jD<k1><k0>kA<Tab><Esc>pjq9@a<k2><k0>dd/<k0><NL>i<k1><Esc>ZZ
0 comments
#112 Christopher Erin / @Chris__Erin - Score: 30 - 09/20/11 @ 17:56
:g/\d/co-10|-1|s!\n!\t<CR><CR>jVGDZZ
0 comments
#113 Tyler Breisacher / @tbreisacher - Score: 30 - 08/25/12 @ 02:34
/1<CR><C-V>nlddG{A<Tab><Esc>"2p:%s/ */<C-V><Tab>/<CR>ZZ
0 comments
#114 Narciso Guillen / @narcisoguillen - Score: 38 - 05/03/12 @ 10:30
qqma11ggA<Esc>v0d'aA<Tab><Esc>p11ggdd'ajq9@q:w<CR>:q<CR>
0 comments
VimGolf