add g:UltiSnipsEnableSnipMate

This commit is contained in:
Stanislav Seletskiy 2014-12-06 23:53:19 +06:00
parent 6dd476750b
commit fc080b4fd5
2 changed files with 16 additions and 1 deletions

View File

@ -193,6 +193,14 @@ g:UltiSnipsSnippetsDir
directories named "snippets" are reserved for directories named "snippets" are reserved for
snipMate snippets and cannot be used. snipMate snippets and cannot be used.
*g:UltiSnipsEnableSnipMate*
g:UltiSnipsEnableSnipMate
Enable looking for SnipMate snippets in
&runtimepath. UltiSnips will search only for
directories named 'snippets' while looking for
SnipMate snippets. Defaults to "1", so UltiSnips
will look for SnipMate snippets.
*:UltiSnipsAddFiletypes* *:UltiSnipsAddFiletypes*
The UltiSnipsAddFiletypes command allows for explicit merging of other snippet The UltiSnipsAddFiletypes command allows for explicit merging of other snippet
@ -1411,6 +1419,7 @@ individuals have contributed to UltiSnips (in chronological order):
Kevin Ballard - kballard Kevin Ballard - kballard
Ahbong Chang - cwahbong Ahbong Chang - cwahbong
Glenn Griffin - ggriffiniii Glenn Griffin - ggriffiniii
Stanislav Seletskiy - seletskiy
Thank you for your support. Thank you for your support.

View File

@ -91,7 +91,13 @@ class SnippetManager(object):
self._added_snippets_source = AddedSnippetsSource() self._added_snippets_source = AddedSnippetsSource()
self.register_snippet_source("ultisnips_files", UltiSnipsFileSource()) self.register_snippet_source("ultisnips_files", UltiSnipsFileSource())
self.register_snippet_source("added", self._added_snippets_source) self.register_snippet_source("added", self._added_snippets_source)
self.register_snippet_source("snipmate_files", SnipMateFileSource())
enable_snipmate = True
if _vim.eval("exists('g:UltiSnipsEnableSnipMate')") == "1":
enable_snipmate = _vim.eval("g:UltiSnipsEnableSnipMate")
if enable_snipmate:
self.register_snippet_source("snipmate_files",
SnipMateFileSource())
self._reinit() self._reinit()