Add support for editing snippets in a new tab (#917)

This commit is contained in:
Michael Anhari 2018-04-01 02:49:15 -04:00 committed by Holger Rapp
parent 23b9f11b7a
commit 71ab5319e3
3 changed files with 4 additions and 1 deletions

View File

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

View File

@ -38,7 +38,7 @@ endif
" UltiSnipsEdit will use this variable to decide if a new window
" is opened when editing. default is "normal", allowed are also
" "vertical", "horizontal", and "context".
" "tabdo", "vertical", "horizontal", and "context".
if !exists("g:UltiSnipsEditSplit")
let g:UltiSnipsEditSplit = 'normal'
endif

View File

@ -185,6 +185,7 @@ There are several variables associated with the UltiSnipsEdit command.
g:UltiSnipsEditSplit Defines how the edit window is opened. Possible
values:
|normal| Default. Opens in the current window.
|tabdo| Opens the window in a new tab.
|horizontal| Splits the window horizontally.
|vertical| Splits the window vertically.
|context| Splits the window vertically or