Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我set statusline+=col:%3v;在 Vim 8 中这样做。
set statusline+=col:%3v;
现在,如果我在第 1 列,我的状态行看起来像col: 1;.
col: 1;
如何获得数字另一侧的填充?例如,如何让我的第 1 列状态行看起来像col:1 ;?
col:1 ;
使用%-3v. 如记录在:help 'statusline:
%-3v
:help 'statusline
field meaning - Left justify the item. The default is right justified when minwid is larger than the length of the item.
这也是printfvim 显然在模仿的惯例。
printf