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:
|
|
||||||
|
all_dirs = []
|
||||||
check_dirs = _vim.eval('&runtimepath').split(',')
|
check_dirs = _vim.eval('&runtimepath').split(',')
|
||||||
patterns = ['%s.snippets', '%s_*.snippets', os.path.join('%s', '*')]
|
|
||||||
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,8 +47,19 @@ 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)))
|
||||||
|
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 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)
|
ret.add(fn)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user