在Vim中设置特定的列选项卡停止 [英] Setting specific column tab stops in Vim
本文介绍了在Vim中设置特定的列选项卡停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我相当熟悉Vim的tabstop
,softtabstop
,shiftwidth
,expandtabs
等选项.
I am reasonably familiar with Vim's option for tabstop
, softtabstop
, shiftwidth
, expandtabs
, etc.
但是,我想知道Vim中是否可以设置特定的列制表位.
However, I'm wondering if there is a way in Vim to set specific column tab stops.
我需要在以下几列中使用制表位:7、11、14、17,...之后每3个.
I need tab stops in the following columns: 7, 11, 14, 17, ... every 3 after that.
先谢谢了.
推荐答案
我发现了该线程 http://vim.1045645.n5.nabble.com/Arbitrary-tab-stops-td1211888.html .好像该功能作为补丁存在了一段时间.
I found this thread http://vim.1045645.n5.nabble.com/Arbitrary-tab-stops-td1211888.html. Seems like that feature exists for a while as a patch.
+ *'vartabstop'* *'vts'*
+ 'vartabstop' 'vts' string (default 8)
+ local to buffer
+ {only available when compiled with the |+vartabs|
+ feature}
+ {not in Vi}
+ A list of the number of spaces that a in the file counts for,
+ separated by commas. Each value corresponds to one tab, with the
+ final value applying to all subsequent tabs. For example:
+ :set vartabstop=4,20,10,8
+ This will make the first tab 4 spaces wide, the second 20 spaces,
+ the third 10 spaces, and all following tabs 8 spaces.
+
+ Note that the value of |'tabstop'| will be ignored while 'vartabstop'
+ is set.
+
这篇关于在Vim中设置特定的列选项卡停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文