Move the vim example to a separate plugin folder
When Powerline is installed as a package in the system-wide site-packages folder it can easily be enabled by adding a simple python statement to the user's vimrc file. Otherwise it can be added by doing a :source path/to/plugin/vim/powerline.vim in vimrc, but the other way of doing it works without specifying the full path as long as Powerline is installed somewhere in sys.path.
This commit is contained in:
parent
175fb1b58e
commit
f074c1fb29
|
@ -1,2 +1,3 @@
|
|||
recursive-include powerline *.json
|
||||
recursive-include plugin *.vim
|
||||
exclude powerline/tests/*.xml
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
import os
|
||||
import vim
|
||||
|
||||
vim.command('source ' + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim'))
|
|
@ -1,5 +1,9 @@
|
|||
" Powerline vim example
|
||||
" Run with :source %
|
||||
" Powerline vim plugin
|
||||
"
|
||||
" If Powerline is installed in a Python search path, load the plugin by
|
||||
" adding the following line to your .vimrc:
|
||||
"
|
||||
" python import plugin.vim.load_vim_plugin
|
||||
|
||||
python import sys, vim, os
|
||||
python sys.path.append(vim.eval('expand("<sfile>:h:h:h")'))
|
||||
|
@ -38,4 +42,3 @@ augroup Powerline
|
|||
autocmd BufEnter,BufWinEnter,WinEnter * let w:current = 1 | call s:UpdateAllWindows()
|
||||
autocmd BufLeave,BufWinLeave,WinLeave * let w:current = 0
|
||||
augroup END
|
||||
" vim: ft=vim noet
|
Loading…
Reference in New Issue