41

.vimrc80 文字を超える行があります。

autocmd FileType python set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with

これはかなり面倒なので、複数行に分けたいのですが、その方法がわかりません。\Python と Bourne シェルではうまくいくので試してみましたが、Vim では有効な構文ではないようです。

autocmd FileType python set smartindent \
    cinwords=if,elif,else,for,while,try,except,finally,def,class,with

与える

E492: Not an editor command

この行を分割する方法を誰か教えてもらえますか?

(完全にリセットするのではなく、追加する方法を誰かが教えてくれればボーナスポイントですcinwords。私が達成したかったのは、withキーワードを追加することだけです。)

4

2 に答える 2

56

ヒット:help line-continuation

基本的\に、継続行の先頭に追加する必要があります。

だから書く代わりに

autocmd FileType python set smartindent \
    cinwords=if,elif,else,for,while,try,except,finally,def,class,with

あなたは書く必要があります

autocmd FileType python set smartindent
       \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
于 2012-05-31T10:15:42.330 に答える
46
autocmd FileType python set smartindent
    \ cinwords+=with
于 2012-05-31T10:17:44.343 に答える