5 ms·
Hmm, how would you replicate the alignment operation they show in the gif using vim? I couldn't immediately think of how to do it. I guess you could select the
by taviso 5y ago
Hmm, how would you replicate the alignment operation they show in the gif using vim? I couldn't immediately think of how to do it.
I guess you could select the block, then maybe s/\>\s\</\=repeat(' ', 20 - col('.'))/g?
That doesn't feel like the right solution though... maybe a macro, something like qa^wi<Tab><Esc>q then visual select and :norm@a? I dunno.
- camel-cdr 5y agoI use the vim easy align plugin for that. You could replicate it with "ga2 ", so go align 2nd space seperated. There are a few alignment modes for the last character (instead of the space), e.g. "|" for markdown and "&" latex tables.