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 214 remaining solutions by signing in and submitting your own entry
#215 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