tabular
tabular copied to clipboard
Align to Nearest Tabstop
I don't think its possible to align to nearest tabstop without first counting characters of the longest line, manually. So I propose this:
:Tabularize /,/r1tc1lt1
abc , d , ghi
a , b
a , b , c
---s....-s-.s-s---
Legend:
-
-
: character -
s
: space -
.
: tab
Where tab is appropriate number of spaces if expandtab
.
Not sure which argument format is best:
" embed actual characters
" more powerful
/pattern/([lrc][^lrc]+)+/
" similar, with control-char delimiter
" most powerful
" more inconvenient to type
/pattern/([lrc][^<ctrl-x>]+<ctrl-x>)+/
" encode space/tab, plugin option to set default as space/tab
" backwards compatible
/pattern/([lrc](\d+[st]?|[st])+)+/