Эх сурвалжийг харах

Skiplist: filter a few files by default

Marco Hinz 5 жил өмнө
parent
commit
04ad724e80
2 өөрчлөгдсөн 21 нэмэгдсэн , 14 устгасан
  1. 6 6
      autoload/startify.vim
  2. 15 8
      doc/startify.txt

+ 6 - 6
autoload/startify.vim

@@ -1113,14 +1113,14 @@ let s:relative_path = get(g:, 'startify_relative_path') ? ':~:.' : ':p:~'
 let s:tf = exists('g:startify_transformations')
 let s:session_dir = startify#get_session_path()
 
-let s:skiplist = get(g:, 'startify_skiplist', [
-      \ 'runtime/doc/.*\.txt',
-      \ 'bundle/.*/doc/.*\.txt',
-      \ 'plugged/.*/doc/.*\.txt',
+let s:skiplist = extend(get(g:, 'startify_skiplist', []), [
+      \ 'runtime/doc/.*\.txt$',
+      \ 'bundle/.*/doc/.*\.txt$',
+      \ 'plugged/.*/doc/.*\.txt$',
       \ '/.git/',
       \ 'fugitiveblame$',
-      \ escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc/.*\.txt',
-      \ ])
+      \ escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc/.*\.txt$',
+      \ ], 'keep')
 
 let s:padding_left = repeat(' ', get(g:, 'startify_padding_left', 3))
 let s:fixed_column = len(s:padding_left) + 2

+ 15 - 8
doc/startify.txt

@@ -381,20 +381,27 @@ At the moment only git, hg, bzr and svn are supported.
 ------------------------------------------------------------------------------
                                                            *g:startify_skiplist*
 >
-    let g:startify_skiplist = [
-        \ 'COMMIT_EDITMSG',
-        \ escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc',
-        \ 'bundle/.*/doc',
-        \ ]
+    let g:startify_skiplist = []
 <
 A list of Vim regular expressions that is used to filter recently used files.
 See |pattern.txt| for what patterns can be used.
 
+The following patterns are filtered by default:
+
+      'runtime/doc/.*\.txt$'
+      'bundle/.*/doc/.*\.txt$'
+      'plugged/.*/doc/.*\.txt$'
+      '/.git/'
+      'fugitiveblame$'
+      escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc/.*\.txt$'
+
 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.
+different: |/\~|.
+
+NOTE: When using backslashes as path separators, escape them. Otherwise using
+"C:\this\vim\path\is\problematic" would not match what you would expect, since
+|/\v| is a pattern, too.
 
 Example:
 >