I installed powerline using pip install as per their installation recommendations. I have it working fine in both zsh as a prompt and tmux as a statusline yet I can't get it to work in vim.
When I add the following to my vimrc:
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
I get the following errors
Error detected while processing /home/jordan/.vimrc:
line 1:
E319: Sorry, the command is not available in this version: python from powerline.vim import setup as powerline_setup
line 2:
E319: Sorry, the command is not available in this version: python powerline_setup()
line 3:
E319: Sorry, the command is not available in this version: python del powerline_setup
EDIT: After checking that my version of vim (vim.gnome) is compiled with python support I noticed it is (python3). So I changed the vimrc to use python3 as per the installation instructions and get the following:
Error detected while processing /home/jordan/.vimrc:
line 1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'powerline'
line 2:
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'powerline_setup' is not defined
line 3:
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'powerline_setup' is not defined
Any ideas, im at my wits end with this!
SOLVED EDIT: I was unable to get it to work with python3 but it seems that is the only version of python supported in vim.gnome and vim.basic.
I installed vim.nox apt install vim-nox-py2 with python 2 support and it all works.
Hopefully this solves somebody else a headache.