If you look at the options used to build the various packages (in debian/rules), you'll see
NOINTERPFLAGS+=--enable-pythoninterp --with-python-config-dir=$(shell python-config --...
It looks like I'm a bit late, but I'll leave this here for future visitors also struggling with this.
$ sudo apt install vim-nox
This is the Vim package in Debian Stretch that adds support for scripting languages.
You should try to do it this way, as it is easier to update/remove.
Edit: Consider switching to Neovim
I usually use this procedure for installation (used also under Debian 9)
# Clean from standard vim
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
# Vim dependency
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev libperl-dev libncurses5-dev ruby-dev
# if you want gVim add also this
sudo apt-get ...
I too struck this issue after updating from Jessie to Stretch.
As noted in another answer, installing vim-nox should resolve this issue (as vim-nox in Stretch is compiled against python2). However, I figured that python3 is the way of the future. So I decided to fix it another way.
If you need Python2 support, installing vim-nox is probably the best ...
Indeed the version you get with apt-get install vim doesn't have all the features of a version compiled with --with-features=huge. For example you don't always have options like +python or +lua.
A good alternative is to use apt-get install vim-nox which is much more complete.
$ sudo apt-get install vim-gtk (or vim-gnome if you are on Ubuntu) will get you the most complete Vim with the least effort.
Official packages usually lag a bit so, if you really want the latest version, you will have to apply the latest patches and build it yourself.
Be aware, though, that new patches come up every couple of days, so keeping up with ...
/usr/share/vim/vimrc is always sourced regardless of your vimrc (assuming $VIM doesn't point somewhere else - :h system-vimrc). The settings you're probably missing are in defaults.vim, a file that only gets sourced if you don't have a personal vimrc. To get them back add these two lines to your vimrc:
If you want more features (and something more up to date than whats in the apt packages), you have to compile it yourself.
You say you are on Debian, and all these should work on that platform.
You will first want to clone the repo and remove any existing vim installations.
git clone https://github.com/vim/vim.git
sudo apt-get remove --purge vim*
The addon packages in Debian/Ubuntu are typically managed using the vim-addon-manager package.
Once an addon package is installed, you run vam install <addon> to enable it in your user's config. In this case, you likely want to run vam install youcompleteme but vam list can confirm the addon name.
In Stretch, the packages changed from supporting Python2 to Python3. As mentioned in another answer, it's not possible to build Vim against both Python2 and Python3 in Debian.
I would suggest getting the plugin to support Python3, but if that's not possible then you would need to either build your own Vim against Python2 or use Neovim (which isn't compiled ...
As noted as a comment, the problem was that I had a /usr/local/bin/vim script which was calling vim without quoting the arguments. So as pointed out by @garyjohn the bash expanded $VIMRUNTIME would have been empty.
Random local vim script removed and all is now well.
If you are looking for a terminal version of vim which supports python (alongs with Lua, Perl, Ruby, and Tcl) without a GUI. I'd recommend to use the vim-nox package.
You can install it with
sudo apt-get install vim-nox
If you are looking for a GUI version vim-gnome is what you are looking for.
sudo apt-get install vim-gnome
Foot page note
And to make it persistent, check out vim's help files under the keyword au for autocmd
Then create a group (scope as the understood term) to protect yourself from duplicate definitions (just like an include guard in C)
" Remove all vimrc autocommands within scope
autocmd BufNewFile,BufRead *.tex set syntax=...
One thing I've just seen is that if cpo contains <, then special characters like <leader> won't be handled right:
< Disable the recognition of special key codes in |<>|
form in mappings, abbreviations, and the "to" part of
menu commands. For example, the command
Logging in and out of the shell solved it for me after all else failed.
Defining let $HOME="/root" in .vimrc does not help as it can not find $HOME directory to read the .vimrc if :!echo $HOME shows nothing, i.e. is empty. ;-)
I tried many possible ways of adding repositories with python support for debian stretch but none of them worked out.
Finally I build my own and then it solved my issue. Here is the link for Vim with python 2 and python support
I couldn't find a specific setting for disabling the wheel while leaving the other mouse features active, but as a workaround, you could map wheel events to do nothing:
map <ScrollWheelUp> <Nop>
map <ScrollWheelDown> <Nop>
You may also need to disable the shift- and control-modified events, and Left and Right if you have a device ...
There is no latex.vim syntax file that ships with Vim (as far as I know, and see on this Fedora 21 install).
Try :set syntax=context or tex or plaintex or initex
I find context a favourite, but that may be first exposure syndrome and the choice of colours.