在Vim状态栏中,右键号码

时间:2018-03-18 22:38:00

标签: vim statusline

说我在Vim 8中做set statusline+=col:%3v;

现在如果我在第1列,我的状态行看起来像col: 1;

如何在号码的另一侧获得填充?例如,如何让我的第1列状态行看起来像col:1 ;

1 个答案:

答案 0 :(得分:4)

使用%-3v。如:help 'statusline中所述:

field       meaning  
-           Left justify the item.  The default is right justified
            when minwid is larger than the length of the item.

这也是printf使用的惯例,vim显然是在模仿。

相关问题