You are not logged in.

#1 2014-11-11 21:06:06

Sam_DM
Member
Registered: 2014-03-09
Posts: 13

Vim powerline in not shown

I am trying to use powerline in vim (from https://github.com/Lokaltog/powerline).

So I installed the "python-powerline-git" package from AUR with yaourt.
I also added the line

let $PYTHONPATH='/usr/lib/python3.4/site-packages'

to my vimrc to solve an import error:

Traceback (most recent call last):
  File "<string>", line 9, in <module>
ImportError: No module named powerline.vim
An error occurred while importing powerline module.
This could be caused by invalid sys.path setting,
or by an incompatible Python version (powerline requires
Python 2.6, 2.7 or 3.2 and later to work). Please consult
the troubleshooting section in the documentation for
possible solutions.
Unable to import powerline, is it installed?

Now when open vim I don't get any error messages or warnings, but the powerline is not there.
Did i forget something obvious?

Powerline does work for zsh after adding

. /usr/lib/python3.4/site-packages/powerline/bindings/zsh/powerline.zsh

Last edited by Sam_DM (2014-11-12 20:58:10)

Offline

#2 2014-11-11 22:10:21

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Vim powerline in not shown

You installed the python3 version of powerline; are you also using (g)vim-python3?

Offline

#3 2014-11-11 22:30:19

Sam_DM
Member
Registered: 2014-03-09
Posts: 13

Re: Vim powerline in not shown

I did use gvim with python 2, but now i installed gvim python 3, still not working sad

EDIT: looking at the optional dependencies of the python-powerline-git package, it does list gvim, not gvim-python-3 as optional dependency

Last edited by Sam_DM (2014-11-11 22:37:42)

Offline

#4 2014-11-11 23:44:25

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Vim powerline in not shown

Sam_DM wrote:

EDIT: looking at the optional dependencies of the python-powerline-git package, it does list gvim, not gvim-python-3 as optional dependency

Yes, but the description adds "compiled with python 3 support"; the python3 version of gvim in the repos didn't exist when the PKGBUILD was created. That's also why I used python2-powerline-git when I tried powerline (I don't use it anymore) and that worked fine (without changing settings, except for setting laststatus=2) with the normal gvim package.

Offline

#5 2014-11-12 08:57:19

Sam_DM
Member
Registered: 2014-03-09
Posts: 13

Re: Vim powerline in not shown

Ok, thanks, set laststatus=2 did the trick (with gvim and python-powerline-git combination), do you know why this is necessary? And why this is not in the installation instructions

Last edited by Sam_DM (2014-11-12 09:32:56)

Offline

#6 2014-11-12 12:13:41

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Vim powerline in not shown

In Vim:

:h laststatus

Offline

#7 2014-11-12 12:16:51

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Vim powerline in not shown

Offline

#8 2014-11-12 20:57:54

Sam_DM
Member
Registered: 2014-03-09
Posts: 13

Re: Vim powerline in not shown

Im still having another problem, in vim but also in zsh.

The arrow characters are not aligning properly.
There is a small gap between the backwards arrows and the block characters, they are also not the same height (the forward and back arrows are not the same height as the line).
I tried different fonts and different sizes, including some patched fonts from AUR (ttf-anonymous-pro-powerline and ttf-inconsolata-dz-powerline) without succes.
It happens on guake, gnome terminal and in gvim.

The only font where the arrows are alinged correctly is the terminus font from the official repositories.

Last edited by Sam_DM (2014-11-12 21:07:23)

Offline

Board footer

Powered by FluxBB