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.
This commit is contained in:
Marco Hinz 2015-04-20 02:45:54 +02:00
parent 96ccdf7f15
commit 3e143739d7
2 changed files with 4 additions and 4 deletions

View file

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

View file

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