Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add g:Powerline_cache_dir setting

Closes #227.
Closes #228.
  • Loading branch information...
commit 6dc1b1503191015dca6f8cbe05f237e97166be22 1 parent 5422f42
@blueyed blueyed authored committed
Showing with 17 additions and 3 deletions.
  1. +12 −2 doc/Powerline.txt
  2. +5 −1 plugin/Powerline.vim
View
14 doc/Powerline.txt
@@ -21,6 +21,7 @@ CONTENTS *Powerline-contents*
4. Configuration ...................... |Powerline-configuration|
4.1 Powerline_cache_file ........... |Powerline_cache_file|
4.1.1 Clearing the cache ....... |:PowerlineClearCache|
+ 4.1.2 Powerline_cache_dir ...... |Powerline_cache_dir|
4.2 Powerline_cache_enabled ........ |Powerline_cache_enabled|
4.3 Powerline_symbols .............. |Powerline_symbols|
4.3.1 Compatible symbols ....... |Powerline-symbols-compatible|
@@ -110,10 +111,19 @@ so the cache file will be regenerated when you change any settings. This may
leave several old cache files in your Vim folder, and these may safely be
deleted.
-Defaults: "<plugin_directory>/Powerline_<theme>_<colorscheme>_<symbols>.cache"
+Defaults: "|Powerline_cache_dir|/Powerline_<theme>_<colorscheme>_<symbols>.cache"
------------------------------------------------------------------------------
-4.1.1 Clearing the cache *:PowerlineClearCache*
+4.1.1 Powerline_cache_dir *Powerline_cache_dir*
+
+This is the directory used for |Powerline_cache_file|.
+
+Default: Plugin directory: >
+
+ let g:Powerline_cache_dir = simplify(expand('<sfile>:p:h') .'/..')
+<
+------------------------------------------------------------------------------
+4.1.2 Clearing the cache *:PowerlineClearCache*
Powerline provides a command to easily clear the cache after changing your
settings or updating your theme. Simply run the following command to clear
View
6 plugin/Powerline.vim
@@ -32,9 +32,13 @@
unlet! s:key s:value
endfor
+ if ! exists('g:Powerline_cache_dir')
+ let g:Powerline_cache_dir = simplify(expand('<sfile>:p:h') .'/..')
+ endif
+
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_cache_dir
\ , g:Powerline_theme
\ , g:Powerline_colorscheme
\ , g:Powerline_symbols
Please sign in to comment.
Something went wrong with that request. Please try again.