aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2012-10-19 15:09:38 -0500
committerBen Beltran <ben@freshout.us>2012-10-19 15:09:38 -0500
commit321ecaca67426410316db7db05e6e33809fe1e63 (patch)
tree3811f15c160c6593e84ebfab3994c810a0eeeda5 /vim/plugin
parent9041bd938fcce0cf91032c67d529bc21fedeeed3 (diff)
Add powerline
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/.DS_Storebin6148 -> 6148 bytes
-rw-r--r--vim/plugin/Powerline.vim56
2 files changed, 56 insertions, 0 deletions
diff --git a/vim/plugin/.DS_Store b/vim/plugin/.DS_Store
index 5008ddf..dd8c972 100644
--- a/vim/plugin/.DS_Store
+++ b/vim/plugin/.DS_Store
Binary files differ
diff --git a/vim/plugin/Powerline.vim b/vim/plugin/Powerline.vim
new file mode 100644
index 0000000..12b4204
--- /dev/null
+++ b/vim/plugin/Powerline.vim
@@ -0,0 +1,56 @@
+" Powerline - The ultimate statusline utility
+"
+" Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
+" Source repository: https://github.com/Lokaltog/vim-powerline
+
+" Script initialization {{{
+ if exists('g:Powerline_loaded') || &compatible || version < 702
+ finish
+ endif
+
+ let g:Powerline_loaded = 1
+" }}}
+" Commands {{{
+ command! PowerlineClearCache call Pl#ClearCache()
+ command! PowerlineReloadColorscheme call Pl#ReloadColorscheme()
+" }}}
+" Set default options {{{
+ for [s:key, s:value] in items({
+ \ 'theme' : 'default'
+ \ , 'colorscheme' : 'default'
+ \ , 'symbols' : 'compatible'
+ \ , 'cache_enabled': 1
+ \ })
+
+ if ! exists('g:Powerline_' . s:key)
+ exec printf('let g:Powerline_%s = %s', s:key, string(s:value))
+ endif
+ endfor
+
+ if ! exists('g:Powerline_cache_file')
+ exec 'let g:Powerline_cache_file = '. string(printf('%s/Powerline_%s_%s_%s.cache'
+ \ , simplify(expand('<sfile>:p:h') .'/..')
+ \ , g:Powerline_theme
+ \ , g:Powerline_colorscheme
+ \ , g:Powerline_symbols
+ \ ))
+ endif
+" }}}
+" Autocommands {{{
+ augroup Powerline
+ autocmd!
+
+ " Reload statuslines when changing color scheme
+ au ColorScheme *
+ \ call Pl#Load()
+
+ au BufEnter,WinEnter,FileType,BufUnload *
+ \ call Pl#UpdateStatusline(1)
+
+ au BufLeave,WinLeave *
+ \ call Pl#UpdateStatusline(0)
+
+ au BufWritePost */autoload/Powerline/Colorschemes/*.vim
+ \ :PowerlineReloadColorscheme
+ augroup END
+" }}}