如何在.vimrc文件中拆分长行?

Fre*_*Foo 34 vim

我有一条线.vimrc超过80个字符长:

autocmd FileType python set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with
Run Code Online (Sandbox Code Playgroud)

我觉得这很烦人,所以我想把它分成多行,但我不知道怎么做.我试过,\因为它在Python和Bourne shell中做了诀窍,但显然在Vim中这不是有效的语法:

autocmd FileType python set smartindent \
    cinwords=if,elif,else,for,while,try,except,finally,def,class,with
Run Code Online (Sandbox Code Playgroud)

E492: Not an editor command
Run Code Online (Sandbox Code Playgroud)

谁能告诉我如何分割这条线?

(如果有人可以告诉我如何添加cinwords而不是完全重置它,那么奖励点;我唯一想要实现的就是添加with关键字.)

shi*_*ime 42

命中:help line-continuation.

基本上你必须\在续行的开头添加.

所以不要写作

autocmd FileType python set smartindent \
    cinwords=if,elif,else,for,while,try,except,finally,def,class,with
Run Code Online (Sandbox Code Playgroud)

你必须写

autocmd FileType python set smartindent
       \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
Run Code Online (Sandbox Code Playgroud)


Tod*_*obs 37

autocmd FileType python set smartindent
    \ cinwords+=with
Run Code Online (Sandbox Code Playgroud)