当我尝试使用 vim 时,我收到所有这些命令的错误(尽管 vim 然后工作):
autocmd BufWritePre *.rb :%s/\s\+$//e
set filetype off
filetype plugin on
filetype indent on
syntax on " Turn on syntax highlighting
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
let mapleader = ","
set foldmethod=indent "fold based on indent
set foldnestmax=10 "deepest fold is 10 levels
set nofoldenable "dont fold by default
set foldlevel=1 "what I use
let loaded_matchparen = 1 " MDD Turn off matching bracket " Ubuntu14 filetype plugin indent on " required
如果我在我的 .vimrc 中注释掉这些行,我不会收到任何错误。
但我怀疑我现在可能已经“丢失”了这些设置。
在 Ubuntu 13 中,它们或 vim 中是否有不同的形式?
错误:
三类:
- 抱歉,该命令在此版本中不可用
- 不支持的选项
- 未知选项
细节:
$ vi .vimrc
Error detected while processing /home/durrantm/.vimrc:
line 20:
E319: Sorry, the command is not available in this version: autocmd BufWritePre *.rb :%s/\s\+$//e
line 24:
E519: Option not supported: filetype
line 25:
E319: Sorry, the command is not available in this version: filetype plugin on
line 26:
E319: Sorry, the command is not available in this version: filetype indent on
line 27:
E319: Sorry, the command is not available in this version: syntax on " Turn on syntax highlighting
line 37:
E319: Sorry, the command is not available in this version: match ExtraWhitespace /\s\+$/
line 38:
E319: Sorry, the command is not available in this version: autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
line 39:
E319: Sorry, the command is not available in this version: autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@
<!$/
line 40:
E319: Sorry, the command is not available in this version: autocmd InsertLeave * match ExtraWhitespace /\s\+$/
line 41:
E319: Sorry, the command is not available in this version: autocmd BufWinLeave * call clearmatches()
line 48:
E319: Sorry, the command is not available in this version: let mapleader = ","
line 52:
E518: Unknown option: foldmethod=indent
line 53:
E518: Unknown option: foldnestmax=10
line 54:
E518: Unknown option: nofoldenable
line 55:
E518: Unknown option: foldlevel=1
line 57:
E319: Sorry, the command is not available in this version: let loaded_matchparen = 1 " MDD Turn off matching brac
ket highlighting.
line 58:
E319: Sorry, the command is not available in this version: filetype plugin indent on
原来我没有vim,只有vi,由于升级后的依赖问题。
TL;博士; - 需要旧版本的依赖项。固定于:
完整版本...
修复是:
试图做:
但是收到消息
然后我尝试了:
最后,意识到消息说依赖关系是
2:7.4.052
但我有2:7.4.335
vim-common 和 vim-runtime,换句话说我有更新的版本。意识到这一点,最终的解决办法是:然后我就能做到;
这解决了除一行之外的所有问题
我改为