diff options
author | Jesse Luehrs <jesse.luehrs@stripe.com> | 2015-02-22 15:48:56 -0800 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2015-02-22 16:06:55 -0800 |
commit | 51497898b7b112891641796d3fd296b15112632c (patch) | |
tree | ecae8befde06b64c767843998622112c812bbecb | |
parent | 9ed4307b06decf0d3da6770f208dbad71977be56 (diff) | |
download | conf-51497898b7b112891641796d3fd296b15112632c.tar.gz conf-51497898b7b112891641796d3fd296b15112632c.zip |
make this a bit more efficient for large directories
-rw-r--r-- | vimrc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -707,8 +707,12 @@ for file in [ '.gitignore', expand('~/.gitignore') ] if filereadable(file) for line in readfile(file) let line = substitute(line, '#.*', '', '') - if line != '' - call extend(g:startify_skiplist, map(glob(line, 1, 1), "substitute(v:val, '[~.*]', '\\\\&', 'g')")) + if line != '' && line[0] != '!' + let line = substitute(line, "[~.]", "\\\\&", 'g') + let line = substitute(line, "\\*\\*", ".*", 'g') + let line = substitute(line, "\\*", "[^/]*", 'g') + let line = substitute(line, "?", ".", 'g') + call add(g:startify_skiplist, line) endif endfor endif |