`
天梯梦
  • 浏览: 13634820 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

Ubuntu: 修复 “Sorry, the command is not available in this version…”

 
阅读更多

Ask:

From my .vimrc, getting:

line   16:
E319: Sorry, the command is not available in this version: filetype on
line   17:
E319: Sorry, the command is not available in this version: filetype plugin on
line   18:
E319: Sorry, the command is not available in this version: filetype indent on
line   21:
E319: Sorry, the command is not available in this version: syntax on
line   45:
E319: Sorry, the command is not available in this version: match ExtraWhitespace /\s\+$/
line   46:
E319: Sorry, the command is not available in this version: autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
line   47:
E319: Sorry, the command is not available in this version: autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
line   48:
E319: Sorry, the command is not available in this version: autocmd InsertLeave * match ExtraWhitespace /\s\+$/
line   49:
E319: Sorry, the command is not available in this version: autocmd BufWinLeave * call clearmatches()

 

I can remove the lines, but I would rather know what I am really missing or need upgrading that is causing this as this file worked for me before.

 

Answer:

Try from within vim ...

:version

 

and if your get ...

Small version without GUI.

 

You are missing package vim-gui-common. It is probably also advisable to install vim-runtime. Commands to install:

sudo apt-get install vim-gui-common
sudo apt-get install vim-runtime

 


Another cause might be that alternatives is pointing to the wrong one:

update-alternatives –display vim

 

to show what is used and ...

update-alternatives –config vim

 

to change to another vim. It could be that /usr/bin/vim.gnome is used and you need /usr/bin/vim


edit: Michael Durrant fixed it with #1 in case anyone wonders.

来源:http://askubuntu.com/questions/284957/vi-getting-multiple-sorry-the-command-is-not-available-in-this-version-af

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics