usage
useful commands
[!TIP|label:references:]
align with first space :
/^\s*\S\+\zs/l0c1l0
specifier | comments |
---|---|
| left-align (with N spaces padding) |
| right-align (with N spaces padding) |
| center-align (with N spaces padding) |
:Tabularize /,/r1c1l0
means:
splitting fields on commas (
:
)print everything before the first comma right aligned, then 1 space
then the comma center aligned, then 1 space,
then everything after the comma left aligned.
including the
<sep>
align to left
or
align to center
align with the N pattern
i.e.: the second match (
=
)
refer to matches the N pattern
[!NOTE] only for default left-alignemnt. Not support customized right/middle alignment. i.e.:
/r1c1l0
align with 2nd matches
for every N matches
or
[!NOTE|label:pre condition:]
align the first
:
and last matches,
as below:
first
:
reference: via
/^[^;]*\zs:
/^[^;]*\zs:/r1c1l0
/^[^;]*/r1c1l0
/^[^:]*\zs:
/^[^:]*\zs/r1c1l0
/^[^:]*\zs:/r1c1l0
/^[^:]*/r1c1l0
/^[^:]*:/r1c1l0
:
last
,
tips:
actually the pattern not matches with the final
,
, but matches with)<.*> ,
sample code:
/)[^,]*\zs,
or even better align
:1,3Tabularize /,
or:'<,'>Tabularize /,
:Tabularize /)[^,]*\zs,
Last updated