它对我不起作用,我想查看我的配置。也许我全球都把它关了。但我不知道谷歌的实际内容是:-)谢谢。
# vim:sw=4:ts=4:et:
答案 0 :(得分:18)
它被称为模式线
:he modeline
如果您开始编辑新文件,并且启用了'modeline'选项,则a 检查文件开头和结尾的行数 模式行。有两种形式的模型。
The first form: [text]{white}{vi:|vim:|ex:}[white]{options}
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
{options} a list of option settings, separated with white space or ':',
where each part between ':' is the argument for a ":set"
command (can be empty)
将此添加到$ MYVIMRC:
setglobal modeline
答案 1 :(得分:4)
它被称为模式线。在帮助中,可以通过grepping找到
helpgrep # vim
如果您想检查调制解调器是否处于活动状态,请执行设置模式行吗?(如果它会说 modeline ,否则 nomodeline )
要将它们关闭,请将其添加到vimrc中
:set modelines=0 "number of modelines vim parses
:set nomodeline "turn off parsing
答案 2 :(得分:0)
:h 'ts
(即:help 'tabstop'
)将提供有关如何使用et
,ts
和sw
的详细说明,并给出一个指针到modeline
(正在讨论的选项是modeline
)。