FS#65331 - powerline-vim has a problem
Attached to Project:
Community Packages
Opened by Sherlock Holo (SherlockHolo) - Thursday, 30 January 2020, 16:22 GMT
Last edited by Jiachen Yang (farseerfc) - Monday, 10 February 2020, 02:59 GMT
Opened by Sherlock Holo (SherlockHolo) - Thursday, 30 January 2020, 16:22 GMT
Last edited by Jiachen Yang (farseerfc) - Monday, 10 February 2020, 02:59 GMT
|
Details
Description:
Install `powerline-vim` and `vim`, when run `vim` will display a warning message 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? Press ENTER or type command to continue Additional info: * package version(s) `powerline-vim`: 2.7-4. `vim`: 8.2.0148-1 * config and/or log files etc. no `.vimrc` in `$HOME` Steps to reproduce: `pacman -S powerline-vim vim` `vim` |
This task depends upon
Closed by Jiachen Yang (farseerfc)
Monday, 10 February 2020, 02:59 GMT
Reason for closing: Works for me
Additional comments about closing: reporter fixed the problem locally by apply changes to .vimrc documented in https://wiki.archlinux.org/index.php/Pow erline#Vim
Monday, 10 February 2020, 02:59 GMT
Reason for closing: Works for me
Additional comments about closing: reporter fixed the problem locally by apply changes to .vimrc documented in https://wiki.archlinux.org/index.php/Pow erline#Vim
1: /etc/vimrc
2: /usr/share/vim/vimfiles/archlinux.vim
3: /usr/share/vim/vim82/defaults.vim
4: /usr/share/vim/vim82/syntax/syntax.vim
5: /usr/share/vim/vim82/syntax/synload.vim
6: /usr/share/vim/vim82/syntax/syncolor.vim
7: /usr/share/vim/vim82/filetype.vim
8: /usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim
9: /usr/share/vim/vimfiles/ftdetect/dockerfile.vim
10: /usr/share/vim/vim82/ftplugin.vim
11: /usr/share/vim/vim82/indent.vim
12: /usr/share/vim/vimfiles/plugin/powerline.vim
13: /usr/share/vim/vim82/plugin/getscriptPlugin.vim
14: /usr/share/vim/vim82/plugin/gzip.vim
15: /usr/share/vim/vim82/plugin/logiPat.vim
16: /usr/share/vim/vim82/plugin/manpager.vim
17: /usr/share/vim/vim82/plugin/matchparen.vim
18: /usr/share/vim/vim82/plugin/netrwPlugin.vim
19: /usr/share/vim/vim82/plugin/rrhelper.vim
20: /usr/share/vim/vim82/plugin/spellfile.vim
21: /usr/share/vim/vim82/plugin/tarPlugin.vim
22: /usr/share/vim/vim82/plugin/tohtml.vim
23: /usr/share/vim/vim82/plugin/vimballPlugin.vim
24: /usr/share/vim/vim82/plugin/zipPlugin.vim
in /etc/vimrc I don't add any custom things.
The installed vimscript (/usr/share/vim/vimfiles/plugin/powerline.vim) can be used with both python2 and python3, and it will load either version with `g:powerline_pycmd`.
You may also want `set laststatus =2` according to the official document of powerline.
Another way to setup powerline is to avoid installing powerline-vim package and initialize powerline from .vimrc by yourself.
It's documented here: https://powerline.readthedocs.io/en/master/usage/other.html#vim-statusline
The same vimscript is installed by python-powerline package in /usr/share/powerline/bindings/vim/plugin/powerline.vim , you will need to let vim load from there if you don't have powerline-vim package.