Skip to content

Commit

Permalink
Change vsnip_auto_select_trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Dec 29, 2019
1 parent 5fca53e commit 340e4c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/vsnip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function! vsnip#get_context() abort
for l:source in vsnip#source#find(&filetype)
for l:snippet in l:source
for l:prefix in (l:snippet.prefix + l:snippet.prefix_alias)
let l:match = matchlist(l:before_text, printf('\%(\<\(\k\+\)\>\.\)\=\<\(\V%s\m\)\>$',
let l:match = matchlist(l:before_text, printf('\%(\(\k\+\)\V%s\m\)\=\<\(\V%s\m\)\>$',
\ escape(g:vsnip_auto_select_trigger, '\'),
\ escape(l:prefix, '\'),
\ ))

Expand Down
6 changes: 6 additions & 0 deletions doc/vsnip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ VARIABLE *vsnip-variable*
You can use this variable to solve this conflict.


>
let g:vsnip_auto_select_trigger = ';'
<
Specify auto select trigger character.


>
let g:vsnip_namespace = ''
<
Expand Down
1 change: 1 addition & 0 deletions plugin/vsnip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let g:vsnip_snippet_dir = get(g:, 'vsnip_snippet_dir', expand('~/.vsnip'))
let g:vsnip_snippet_dirs = get(g:, 'vsnip_snippet_dirs', [])
let g:vsnip_sync_delay = get(g:, 'vsnip_sync_delay', 0)
let g:vsnip_choice_delay = get(g:, 'vsnip_choice_delay', 500)
let g:vsnip_auto_select_trigger = get(g:, 'vsnip_auto_select_trigger', ';')
let g:vsnip_namespace = get(g:, 'vsnip_namespace', '')

"
Expand Down

0 comments on commit 340e4c0

Please sign in to comment.