Add 'context' value to g:UltiSnipsEditSplit

This commit is contained in:
petobens 2014-08-28 09:34:33 -03:00
parent 59defbdd53
commit 2c3c4a7776
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,11 @@ function! UltiSnips#Edit(bang, ...)
let mode = 'vs'
elseif g:UltiSnipsEditSplit == 'horizontal'
let mode = 'sp'
elseif g:UltiSnipsEditSplit == 'context'
let mode = 'vs'
if winwidth(0) <= 2 * (&tw ? &tw : 80)
let mode = 'sp'
endif
endif
endif
exe ':'.mode.' '.file

View File

@ -180,6 +180,8 @@ g:UltiSnipsEditSplit Defines how the edit window is opened. Possible
|normal| Default. Opens in the current window.
|horizontal| Splits the window horizontally.
|vertical| Splits the window vertically.
|context| Splits the window vertically or
horizontally depending on context.
*g:UltiSnipsSnippetsDir*
g:UltiSnipsSnippetsDir