From 360a6dc0deb5c0a2e43ccaadb9ba80d85f1bd6c2 Mon Sep 17 00:00:00 2001 From: Denis Kolesnikov Date: Thu, 17 Dec 2015 14:41:17 +0600 Subject: [PATCH] Added option to choose UltiSnip expand function --- autoload/CleverTab.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/CleverTab.vim b/autoload/CleverTab.vim index 2c7e2a6..ef84a29 100644 --- a/autoload/CleverTab.vim +++ b/autoload/CleverTab.vim @@ -81,8 +81,12 @@ function! CleverTab#Complete(type) return "" elseif a:type == 'ultisnips' && !g:CleverTab#cursor_moved && !g:CleverTab#stop - let g:ulti_x = UltiSnips#ExpandSnippetOrJump() - if g:ulti_expand_or_jump_res + if exists('g:CleverTabUltiExpandOrJump') + let g:ulti_x = UltiSnips#ExpandSnippetOrJump() + else + let g:ulti_x = UltiSnips#ExpandSnippet() + endif + if (exists('g:ulti_expand_or_jump_res') && g:ulti_expand_or_jump_res) || (exists('g:ulti_expand_res') && g:ulti_expand_res) echom "Ultisnips" let g:CleverTab#next_step_direction="0" let g:CleverTab#stop=1