set statusline+=col:%3v;在 Vim 8 中说我愿意。
现在,如果我在第 1 列,我的状态栏看起来像col: 1;。
如何获得数字另一侧的填充?例如,如何让我的第 1 列状态栏看起来像这样col:1 ;?
使用%-3v。如记录在:help 'statusline:
field meaning
- Left justify the item. The default is right justified
when minwid is larger than the length of the item.
Run Code Online (Sandbox Code Playgroud)
这也是 所使用的约定printf,vim 显然是在模仿它。