diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index c84bbbf..d092dfe 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: neosnippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 01 Jan 2014. +" Last Modified: 11 Mar 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -38,6 +38,8 @@ call neosnippet#util#set_default( \ 'g:neosnippet#disable_select_mode_mappings', 1) call neosnippet#util#set_default( \ 'g:neosnippet#enable_snipmate_compatibility', 0) +call neosnippet#util#set_default( + \ 'g:neosnippet#expand_word_boundary', 0) "}}} function! neosnippet#expandable_or_jumpable() "{{{ diff --git a/autoload/neosnippet/helpers.vim b/autoload/neosnippet/helpers.vim index 3ddf263..c5d232e 100644 --- a/autoload/neosnippet/helpers.vim +++ b/autoload/neosnippet/helpers.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: helpers.vim " AUTHOR: Shougo Matsushita -" Last Modified: 21 Nov 2013. +" Last Modified: 11 Mar 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the diff --git a/autoload/neosnippet/parser.vim b/autoload/neosnippet/parser.vim index 5070b05..ecd77e5 100644 --- a/autoload/neosnippet/parser.vim +++ b/autoload/neosnippet/parser.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: parser.vim " AUTHOR: Shougo Matsushita -" Last Modified: 21 Nov 2013. +" Last Modified: 11 Mar 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -238,7 +238,8 @@ function! neosnippet#parser#_initialize_snippet(dict, path, line, pattern, name) endfunction"}}} function! neosnippet#parser#_initialize_snippet_options() "{{{ - return { 'head' : 0, 'word' : 0, 'indent' : 0 } + return { 'head' : 0, 'word' : + \ g:neosnippet#expand_word_boundary, 'indent' : 0 } endfunction"}}} let &cpo = s:save_cpo diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 5fee4ed..732a06d 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -208,6 +208,13 @@ g:neosnippet#enable_preview *g:neosnippet#enable_preview* If this variable is not 0, neosnippet will enable the preview window feature in neocomplcache/neocomplete sources. + The default value is 0. + + *g:neosnippet#expand_word_boundary* +g:neosnippet#expand_word_boundary + It it is not 0, neosnippet will expand snippets by a word + boundary. + The default value is 0. *g:neosnippet#scope_aliases* @@ -698,7 +705,8 @@ FAQ *neosnippet-faq* Q: What if I want to expand a snippet trigger after (, [, " etc...: A: You should use "options word" in the snippet definition. This changes the -expansion behavior to a word boundary. +expansion behavior to a word boundary or set +|g:neosnippet#enable_word_expand|. > snippet date options word