From e1436a8aeb1625597158bc08ce68ab9f4f686ead Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Thu, 15 Jan 2015 08:17:37 +0100 Subject: [PATCH] Accept numbers and text for disabling snipMate. --- autoload/UltiSnips/bootstrap.vim | 5 +++++ doc/UltiSnips.txt | 1 + pythonx/UltiSnips/snippet_manager.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/UltiSnips/bootstrap.vim b/autoload/UltiSnips/bootstrap.vim index d5c865c..e4905aa 100644 --- a/autoload/UltiSnips/bootstrap.vim +++ b/autoload/UltiSnips/bootstrap.vim @@ -82,3 +82,8 @@ endif if !exists("g:UltiSnipsSnippetDirectories") let g:UltiSnipsSnippetDirectories = [ "UltiSnips" ] endif + +" Enable or Disable snipmate snippet expansion. +if !exists("g:UltiSnipsEnableSnipMate") + let g:UltiSnipsEnableSnipMate = 1 +endif diff --git a/doc/UltiSnips.txt b/doc/UltiSnips.txt index 5906296..83023cd 100644 --- a/doc/UltiSnips.txt +++ b/doc/UltiSnips.txt @@ -1421,6 +1421,7 @@ individuals have contributed to UltiSnips (in chronological order): Glenn Griffin - ggriffiniii Michael - Pyrohh Stanislav Seletskiy - seletskiy + Pawel Palucki - ppalucki Thank you for your support. diff --git a/pythonx/UltiSnips/snippet_manager.py b/pythonx/UltiSnips/snippet_manager.py index bf3a319..6781fee 100644 --- a/pythonx/UltiSnips/snippet_manager.py +++ b/pythonx/UltiSnips/snippet_manager.py @@ -95,7 +95,7 @@ class SnippetManager(object): enable_snipmate = True if _vim.eval("exists('g:UltiSnipsEnableSnipMate')") == "1": enable_snipmate = _vim.eval("g:UltiSnipsEnableSnipMate") - if enable_snipmate: + if enable_snipmate == "1": self.register_snippet_source("snipmate_files", SnipMateFileSource())