Add 'context' value to g:UltiSnipsEditSplit
This commit is contained in:
parent
59defbdd53
commit
2c3c4a7776
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user