Change skiplist default + improve docs

Thanks for the feedback, @Osse.
This commit is contained in:
Marco Hinz 2015-07-06 18:19:43 +02:00
parent 2ae8a96633
commit 695121f065
2 changed files with 22 additions and 22 deletions

View file

@ -19,7 +19,7 @@ let s:session_dir = resolve(expand(get(g:, 'startify_session_dir',
let s:skiplist = get(g:, 'startify_skiplist', [
\ 'COMMIT_EDITMSG',
\ fnamemodify($VIMRUNTIME, ':p') .'/doc',
\ escape(fnamemodify($VIMRUNTIME, ':p'), '\') .'doc',
\ 'bundle/.*/doc',
\ ])
@ -89,7 +89,7 @@ function! startify#insane_in_the_membrane() abort
if empty(v:oldfiles)
echohl WarningMsg
echomsg "startify: Can't read viminfo file. Read :help startify-faq-02"
echohl None
echohl NONE
endif
let b:startify_section_header_lines = []
@ -537,9 +537,15 @@ endfunction
" Function: s:is_in_skiplist {{{1
function! s:is_in_skiplist(arg) abort
for regexp in s:skiplist
if (a:arg =~# regexp)
return 1
endif
try
if a:arg =~# regexp
return 1
endif
catch
echohl WarningMsg
echomsg 'startify: Pattern '. string(regexp) .' threw an exception. Read :help g:startify_skiplist'
echohl NONE
endtry
endfor
endfunction

View file

@ -247,17 +247,18 @@ At the moment only git, hg, bzr and svn are supported.
>
let g:startify_skiplist = [
\ 'COMMIT_EDITMSG',
\ fnamemodify($VIMRUNTIME, ':p') .'/doc',
\ escape(fnamemodify($VIMRUNTIME, ':p'), '\') .'doc',
\ 'bundle/.*/doc',
\ '.vimgolf',
\ ]
<
A list of Vim regular expressions that is used to filter recently used files.
See |pattern.txt| for what patterns can be used.
NOTE: Due to the nature of patterns, you can't just use something like
"'~/mysecret'" but have to use "$HOME . '/mysecret.txt". The former would do
something entirely different: |/\~|
NOTE: Due to the nature of patterns, you can't just use "~/mysecret" but have
to use "$HOME .'/mysecret.txt'". The former would do something entirely
different: |/\~|. When using backslashes as path separators, escape them.
Otherwise using "C:\this\vim\path\is\problematic" would not match what you
expect, since |/\v| is a pattern, too.
Example:
>
@ -265,7 +266,7 @@ Example:
\ '\.vimgolf',
\ '^/tmp',
\ '/project/.*/documentation',
\ $HOME . '/mysecret.txt',
\ escape(fnamemodify($HOME, ':p'), '\') .'mysecret.txt',
\ ]
<
------------------------------------------------------------------------------
@ -629,15 +630,8 @@ Some people swear it works for them with these settings:
*startify-faq-04*
How to disable common but unimportant files?~
Use the skiplist. Personally I use:
>
let g:startify_skiplist = [
\ 'COMMIT_EDITMSG',
\ fnamemodify($VIMRUNTIME, ':p') .'/doc',
\ 'bundle/.*/doc',
\ '\.DS_Store'
\ ]
<
Use |g:startify_skiplist|.
------------------------------------------------------------------------------
*startify-faq-05*
CtrlP or NERDTree open a split in Startify!~
@ -714,9 +708,9 @@ This is my configuration..
let g:startify_skiplist = [
\ 'COMMIT_EDITMSG',
\ fnamemodify($VIMRUNTIME, ':p') .'/doc',
\ 'bundle/.*/doc',
\ '\.vimgolf',
\ '/data/repo/neovim/runtime/doc',
\ '/Users/mhi/local/vim/share/vim/vim74/doc',
\ ]
let g:startify_bookmarks = [