Skip to content

Commit

Permalink
let the default wildignore be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Yggdroot committed Nov 7, 2017
1 parent d4b6e69 commit 11a455b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 8 additions & 4 deletions autoload/leaderf/python/leaderf/fileExpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,16 @@ def _buildCmd(self, dir):
color = ""
ignore = ""
for i in wildignore["dir"]:
ignore += ' -g "!%s"' % i
if not i.startswith('.'): # rg does not show hidden files by default
ignore += ' -g "!%s"' % i
for i in wildignore["file"]:
ignore += ' -g "!%s"' % i
else:
color = "--color never"
ignore = ""
for i in wildignore["dir"]:
ignore += " -g '!%s'" % i
if not i.startswith('.'): # rg does not show hidden files by default
ignore += " -g '!%s'" % i
for i in wildignore["file"]:
ignore += " -g '!%s'" % i

Expand All @@ -270,7 +272,8 @@ def _buildCmd(self, dir):
wildignore = lfEval("g:Lf_WildIgnore")
ignore = ""
for i in wildignore["dir"]:
ignore += " --ignore=%s" % i
if not i.startswith('.'): # pt does not show hidden files by default
ignore += " --ignore=%s" % i
for i in wildignore["file"]:
ignore += " --ignore=%s" % i

Expand All @@ -284,7 +287,8 @@ def _buildCmd(self, dir):
wildignore = lfEval("g:Lf_WildIgnore")
ignore = ""
for i in wildignore["dir"]:
ignore += ' --ignore "%s"' % i
if not i.startswith('.'): # ag does not show hidden files by default
ignore += ' --ignore "%s"' % i
for i in wildignore["file"]:
ignore += ' --ignore "%s"' % i

Expand Down
8 changes: 7 additions & 1 deletion doc/leaderf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ g:Lf_WildIgnore *g:Lf_WildIgnore*
Default value is: >
let g:Lf_WildIgnore = {
\ 'dir': ['.svn','.git','.hg'],
\ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
\ 'file': []
\}
<
Here uses the Unix shell-style wildcards, which are not the same as
Expand All @@ -153,6 +153,12 @@ g:Lf_WildIgnore *g:Lf_WildIgnore*
[seq] | matches any character in seq
[!seq] | matches any character not in seq
-------------------------------------------
<
For example, you can set as below: >
let g:Lf_WildIgnore = {
\ 'dir': ['.svn','.git','.hg'],
\ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
\}
<
g:Lf_DelimiterChar *g:Lf_DelimiterChar*
In NameOnly mode, if you want to refine the result by typing extra
Expand Down
2 changes: 1 addition & 1 deletion plugin/leaderf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ call s:InitVar('g:Lf_HighlightIndividual', 1)
call s:InitVar('g:Lf_NumberOfHighlight', 100)
call s:InitVar('g:Lf_WildIgnore', {
\ 'dir': ['.svn','.git','.hg'],
\ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
\ 'file': []
\})
call s:InitVar('g:Lf_StlSeparator', {
\ 'left': '',
Expand Down

0 comments on commit 11a455b

Please sign in to comment.