Small fixes from Ryan

This commit is contained in:
Holger Rapp 2011-02-06 22:18:09 +01:00
commit 489a9ad8d4
2 changed files with 5 additions and 6 deletions

View File

@ -188,12 +188,8 @@ endf
python << EOF python << EOF
import vim, os, sys import vim, os, sys
for p in vim.eval("&runtimepath").split(','): new_path = vim.eval('expand("<sfile>:h")')
dname = p + os.path.sep + "plugin" sys.path.append(new_path)
if os.path.exists(dname + os.path.sep + "UltiSnips"):
if dname not in sys.path:
sys.path.append(dname)
break
from UltiSnips import UltiSnips_Manager from UltiSnips import UltiSnips_Manager
UltiSnips_Manager.expand_trigger = vim.eval("g:UltiSnipsExpandTrigger") UltiSnips_Manager.expand_trigger = vim.eval("g:UltiSnipsExpandTrigger")

View File

@ -665,6 +665,9 @@ class SnippetManager(object):
if snip.matches(before): if snip.matches(before):
self._do_snippet(snip, before, after) self._do_snippet(snip, before, after)
return True
else:
return False
def clear_snippets(self, triggers = [], ft = "all"): def clear_snippets(self, triggers = [], ft = "all"):
if ft in self._snippets: if ft in self._snippets: