From bab27f8a951becf205461ada4ff3fd2926889cc5 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Fri, 2 Oct 2015 06:32:37 +0900 Subject: [PATCH] Add b:neosnippet_disable_snippet_triggers --- autoload/neosnippet/helpers.vim | 5 +++++ doc/neosnippet.txt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/autoload/neosnippet/helpers.vim b/autoload/neosnippet/helpers.vim index 3c66243..821e171 100644 --- a/autoload/neosnippet/helpers.vim +++ b/autoload/neosnippet/helpers.vim @@ -66,6 +66,11 @@ function! neosnippet#helpers#get_snippets() "{{{ call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')") + if exists('b:neosnippet_disable_snippet_triggers') + call filter(snippets, + \ "index(b:neosnippet_disable_snippet_triggers, v:val.word) < 0") + endif + return snippets endfunction"}}} function! neosnippet#helpers#get_completion_snippets() "{{{ diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 8279d7e..7bcefb5 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -238,6 +238,11 @@ g:neosnippet#data_directory *g:neosnippet#data_directory* Default value is "$XDG_CACHE_HOME/neosnippet" or expand("~/.cache/neosnippet"); the absolute path of it. + *b:neosnippet_disable_snippet_triggers* +b:neosnippet_disable_snippet_triggers + Specifies the triggers which disables in the buffer. + It is useful to disable some snippet triggers. + ------------------------------------------------------------------------------ KEY MAPPINGS *neosnippet-key-mappings*