From 71ab5319e342ccb7e2b11876a5bee62d5e438cab Mon Sep 17 00:00:00 2001 From: Michael Anhari Date: Sun, 1 Apr 2018 02:49:15 -0400 Subject: [PATCH] Add support for editing snippets in a new tab (#917) --- autoload/UltiSnips.vim | 2 ++ autoload/UltiSnips/map_keys.vim | 2 +- doc/UltiSnips.txt | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/UltiSnips.vim b/autoload/UltiSnips.vim index 7e4830d..1ce68c2 100644 --- a/autoload/UltiSnips.vim +++ b/autoload/UltiSnips.vim @@ -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) diff --git a/autoload/UltiSnips/map_keys.vim b/autoload/UltiSnips/map_keys.vim index 218b507..ea966dc 100644 --- a/autoload/UltiSnips/map_keys.vim +++ b/autoload/UltiSnips/map_keys.vim @@ -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 diff --git a/doc/UltiSnips.txt b/doc/UltiSnips.txt index 4645c8f..c5857bc 100644 --- a/doc/UltiSnips.txt +++ b/doc/UltiSnips.txt @@ -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