Add 'context' value to g:UltiSnipsEditSplit.

This commit is contained in:
Holger Rapp 2014-08-29 07:30:26 +02:00
commit c681560b42
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.' '.escape(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