Procházet zdrojové kódy

Expand '~' in the skiplist

The skiplist gets checked against normal Vim regular expressions. That also
means that you can't just use '~'; see ":h /\~".

That especially sneaky if you use variables that refer to directories within
your home directory.

Solution: expand them via fnamemodify().

References #154.
Marco Hinz před 10 roky
rodič
revize
3e143739d7
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 1 1
      autoload/startify.vim
  2. 3 3
      doc/startify.txt

+ 1 - 1
autoload/startify.vim

@@ -20,7 +20,7 @@ let s:session_dir    = resolve(expand(get(g:, 'startify_session_dir',
 
 let s:skiplist = get(g:, 'startify_skiplist', [
       \ 'COMMIT_EDITMSG',
-      \ $VIMRUNTIME .'/doc',
+      \ fnamemodify($VIMRUNTIME, ':p') .'/doc',
       \ 'bundle/.*/doc',
       \ ])
 

+ 3 - 3
doc/startify.txt

@@ -246,7 +246,7 @@ At the moment only git, hg, bzr and svn are supported.
 >
     let g:startify_skiplist = [
         \ 'COMMIT_EDITMSG',
-        \ $VIMRUNTIME .'/doc',
+        \ fnamemodify($VIMRUNTIME, ':p') .'/doc',
         \ 'bundle/.*/doc',
         \ '.vimgolf',
         \ ]
@@ -610,7 +610,7 @@ Use the skiplist. Personally I use:
 >
     let g:startify_skiplist = [
            \ 'COMMIT_EDITMSG',
-           \ $VIMRUNTIME .'/doc',
+           \ fnamemodify($VIMRUNTIME, ':p') .'/doc',
            \ 'bundle/.*/doc',
            \ '\.DS_Store'
            \ ]
@@ -691,7 +691,7 @@ This is my configuration..
 
     let g:startify_skiplist = [
                 \ 'COMMIT_EDITMSG',
-                \ $VIMRUNTIME .'/doc',
+                \ fnamemodify($VIMRUNTIME, ':p') .'/doc',
                 \ 'bundle/.*/doc',
                 \ '\.vimgolf',
                 \ ]