VIM Powerline unter Debian
Geschrieben am 07-10-2017 - ⧖ 2 minEin Bekannter von mir hat Debian stretch laufen und wollte unbedingt die Powerline in Verbindung mit VIM 8.0 nutzen; installiert ist sie, da er sie bereits mit der Bash (oergs) und tmux (yay) verwendet. Nur mit VIM will sie nicht und das obwohl er sich an /usr/share/doc/powerline/README.Debian gehalten hat, in der folgendes steht:
your ~/.vimrc file:<br />
<br />
python from powerline.vim import setup as powerline_setup<br />
python powerline_setup()<br />
python del powerline_setup<br />
<br />
Replace 'python' with 'python3' if appropriate.
Alternatively, if the vim-addon-manager package is installed, the following command may be used:<br />
vim-addons install powerline
Und das obwohl Python ebenfalls installiert ist; sogar 2.7.13 und 3.5. Ist VIM aber egal und meldet sich noch immer mit
You need vim
compiled with Python 2.6, 2.7 or 3.2 and later support for Powerline to work. Please consult the
documentation for more details.<br />
Press ENTER or type command to continue
zu Wort. Der Fehlerteufel lag im Detail; VIM 8.0 wurde via apt install vim
installiert und da sieht es wie folgt aus:
$ vim --version<br />
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 23 2017 12:10:29)<br />
[...]<br />
Huge version without GUI. Features included (+) or not (-):<br />
[...]<br />
+cryptv +linebreak <b>-python</b> +vreplace<br />
+cscope +lispindent <b>-python3</b> +wildignore<br />
[...]
und da die Powerline auf Python basiert, aber VIM keinen Interpreter dazu anbietet,
funktioniert es nicht. Die Lösung war also apt install vim-nox
oder VIM aus den Sourcen
bauen und dem configure-Script ein --enable-pythoninterp=yes
übergeben (oder
halt python3interp).