Remove long unused .bzrignore. (#968)
This commit is contained in:
parent
36f5618745
commit
debef2b1a7
@ -1,2 +0,0 @@
|
||||
doc/tags
|
||||
.bzr-repo
|
@ -32,7 +32,7 @@ def _splitall(path):
|
||||
return allparts
|
||||
|
||||
|
||||
def snipmate_files_for(ft):
|
||||
def _snipmate_files_for(ft):
|
||||
"""Returns all snipMate files we need to look at for 'ft'."""
|
||||
if ft == 'all':
|
||||
ft = '_'
|
||||
@ -116,7 +116,7 @@ class SnipMateFileSource(SnippetFileSource):
|
||||
"""Manages all snipMate snippet definitions found in rtp."""
|
||||
|
||||
def _get_all_snippet_files_for(self, ft):
|
||||
return snipmate_files_for(ft)
|
||||
return _snipmate_files_for(ft)
|
||||
|
||||
def _parse_snippet_file(self, filedata, filename):
|
||||
if filename.lower().endswith('snippet'):
|
||||
|
@ -25,20 +25,19 @@ def find_snippet_files(ft, directory):
|
||||
ret.add(os.path.realpath(fn))
|
||||
return ret
|
||||
|
||||
def _find_all_snippet_directories():
|
||||
"""Returns a list of the absolute path of all snippet directories to
|
||||
search."""
|
||||
|
||||
def find_all_snippet_files(ft):
|
||||
"""Returns all snippet files matching 'ft' in the given runtime path
|
||||
directory."""
|
||||
if _vim.eval("exists('b:UltiSnipsSnippetDirectories')") == '1':
|
||||
snippet_dirs = _vim.eval('b:UltiSnipsSnippetDirectories')
|
||||
else:
|
||||
snippet_dirs = _vim.eval('g:UltiSnipsSnippetDirectories')
|
||||
if len(snippet_dirs) == 1 and os.path.isabs(snippet_dirs[0]):
|
||||
check_dirs = ['']
|
||||
else:
|
||||
return snippet_dirs
|
||||
|
||||
all_dirs = []
|
||||
check_dirs = _vim.eval('&runtimepath').split(',')
|
||||
patterns = ['%s.snippets', '%s_*.snippets', os.path.join('%s', '*')]
|
||||
ret = set()
|
||||
for rtp in check_dirs:
|
||||
for snippet_dir in snippet_dirs:
|
||||
if snippet_dir == 'snippets':
|
||||
@ -48,8 +47,19 @@ def find_all_snippet_files(ft):
|
||||
'directory for UltiSnips snippets.')
|
||||
pth = os.path.realpath(os.path.expanduser(
|
||||
os.path.join(rtp, snippet_dir)))
|
||||
if os.path.isdir(pth):
|
||||
all_dirs.append(pth)
|
||||
return all_dirs
|
||||
|
||||
|
||||
def find_all_snippet_files(ft):
|
||||
"""Returns all snippet files matching 'ft' in the given runtime path
|
||||
directory."""
|
||||
patterns = ['%s.snippets', '%s_*.snippets', os.path.join('%s', '*')]
|
||||
ret = set()
|
||||
for directory in _find_all_snippet_directories():
|
||||
for pattern in patterns:
|
||||
for fn in glob.glob(os.path.join(pth, pattern % ft)):
|
||||
for fn in glob.glob(os.path.join(directory, pattern % ft)):
|
||||
ret.add(fn)
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user