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
|
return allparts
|
||||||
|
|
||||||
|
|
||||||
def snipmate_files_for(ft):
|
def _snipmate_files_for(ft):
|
||||||
"""Returns all snipMate files we need to look at for 'ft'."""
|
"""Returns all snipMate files we need to look at for 'ft'."""
|
||||||
if ft == 'all':
|
if ft == 'all':
|
||||||
ft = '_'
|
ft = '_'
|
||||||
@ -116,7 +116,7 @@ class SnipMateFileSource(SnippetFileSource):
|
|||||||
"""Manages all snipMate snippet definitions found in rtp."""
|
"""Manages all snipMate snippet definitions found in rtp."""
|
||||||
|
|
||||||
def _get_all_snippet_files_for(self, ft):
|
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):
|
def _parse_snippet_file(self, filedata, filename):
|
||||||
if filename.lower().endswith('snippet'):
|
if filename.lower().endswith('snippet'):
|
||||||
|
@ -25,20 +25,19 @@ def find_snippet_files(ft, directory):
|
|||||||
ret.add(os.path.realpath(fn))
|
ret.add(os.path.realpath(fn))
|
||||||
return ret
|
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':
|
if _vim.eval("exists('b:UltiSnipsSnippetDirectories')") == '1':
|
||||||
snippet_dirs = _vim.eval('b:UltiSnipsSnippetDirectories')
|
snippet_dirs = _vim.eval('b:UltiSnipsSnippetDirectories')
|
||||||
else:
|
else:
|
||||||
snippet_dirs = _vim.eval('g:UltiSnipsSnippetDirectories')
|
snippet_dirs = _vim.eval('g:UltiSnipsSnippetDirectories')
|
||||||
if len(snippet_dirs) == 1 and os.path.isabs(snippet_dirs[0]):
|
if len(snippet_dirs) == 1 and os.path.isabs(snippet_dirs[0]):
|
||||||
check_dirs = ['']
|
return snippet_dirs
|
||||||
else:
|
|
||||||
check_dirs = _vim.eval('&runtimepath').split(',')
|
all_dirs = []
|
||||||
patterns = ['%s.snippets', '%s_*.snippets', os.path.join('%s', '*')]
|
check_dirs = _vim.eval('&runtimepath').split(',')
|
||||||
ret = set()
|
|
||||||
for rtp in check_dirs:
|
for rtp in check_dirs:
|
||||||
for snippet_dir in snippet_dirs:
|
for snippet_dir in snippet_dirs:
|
||||||
if snippet_dir == 'snippets':
|
if snippet_dir == 'snippets':
|
||||||
@ -48,9 +47,20 @@ def find_all_snippet_files(ft):
|
|||||||
'directory for UltiSnips snippets.')
|
'directory for UltiSnips snippets.')
|
||||||
pth = os.path.realpath(os.path.expanduser(
|
pth = os.path.realpath(os.path.expanduser(
|
||||||
os.path.join(rtp, snippet_dir)))
|
os.path.join(rtp, snippet_dir)))
|
||||||
for pattern in patterns:
|
if os.path.isdir(pth):
|
||||||
for fn in glob.glob(os.path.join(pth, pattern % ft)):
|
all_dirs.append(pth)
|
||||||
ret.add(fn)
|
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(directory, pattern % ft)):
|
||||||
|
ret.add(fn)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user