Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
I'm using debian, not ubuntu, so this may not apply. On debian jessie, the skinny vim-tiny package is installed by default, which does not include the vim-runtime package. I fixed my E319's by installing the more bloated vim package, which has vim-runtime as a dependency. – NovaDenizen Jun 7 at 15:16
up vote 25 down vote accepted

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.

share|improve this answer
    
+1 on the answer, thanks, fixed for me too (on a puphpet.com-provisioned VM running Ubuntu 12.04 LTS 64bit): the commands mentioned in the answer above: 1) sudo apt-get install vim-gui-common then 2) sudo apt-get install vim-runtime fixed it for me - i.e. no more E319: Sorry, the command is not available in this version: errors. In fact, 1) was the fix, really when issuing command 2) I got messages saying things were already up to date: ...vim-runtime is already the newest version. vim-runtime set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 59 not upgraded. – therobyouknow Jul 7 '14 at 12:52
    
If you don't want the GUI, you can just sudo apt-get install vim-nox (and then :version will report Huge version without GUI.) – ysth Mar 30 at 16:04

For me I had to install vim.nox-py2:

aptitude install vim-nox-py2

and use update-alternatives to activate it:

update-alternatives --config vim

select the number corresponding to vim.nox-py2.

share|improve this answer
    
To be noted that this is for 16.04. Vim on Ubuntu used to have only python2 enabled, now it's python3-enabled and python2 ones in a separate package. – muru Mar 27 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.