加载Python文件时,我有此脚本来设置变量
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
Run Code Online (Sandbox Code Playgroud)
加载Python文件时,出现以下错误:
Error detected while processing BufRead Auto commands for "*.py":
E518: Unknown option: set
Run Code Online (Sandbox Code Playgroud)
这应该工作:
au BufNewFile,BufRead *.test set tabstop=4
\softtabstop=4
\shiftwidth=4
\textwidth=790
\expandtab
\autoindent
\fileformat=unix
Run Code Online (Sandbox Code Playgroud)
要么
au BufNewFile,BufRead *.test set tabstop=4|set softtabstop=4|set shiftwidth=4|set textwidth=79 |set expandtab|set autoindent|set fileformat=unix
Run Code Online (Sandbox Code Playgroud)
要么
au BufNewFile,BufRead *.test set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1275 次 |
最近记录: |