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

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值