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.
Try from within
vim
...and if your get ...
You are missing package
vim-gui-common
. It is probably also advisable to installvim-runtime
. Commands to install:Another cause might be that alternatives is pointing to the wrong one:
to show what is used and ...
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.
You probably don't have the full version of VIM installed. To check, try executing
vim
or:For example, Ubuntu 16.04 LTS only came with
/usr/bin/vim.tiny
Install the full VIM:
Now you should have
/usr/bin/vim.basic
, and the.vimrc
commands should succeed.If this started after you've updated to 16.04, it might be b/c of the change to python 3 as the default interpreter as @luka5z pointed out.
To resolve, I updated to the latest clang-format.py file from https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format.py
and edited .vimrc lines from:
to:
If you got the error by running other command like crontab -e, the reason is you need to select vim as your editor. Default nano will be used. So just run select-editor, and select vim, then the problem will be solved.
For me I had to install vim.nox-py2:
and use update-alternatives to activate it:
select the number corresponding to vim.nox-py2.
In my case the problem was that I had a file
~/.selected_editor
with content:I rerun
select-editor
command and selected/usr/bin/vim.basic
option - this changed the editor used by external programs.