diff --git a/README b/README index ed7ff71..6980253 100644 --- a/README +++ b/README @@ -3,6 +3,12 @@ This is a mirror of http://www.vim.org/scripts/script.php?script_id=1961 Usage: :Tabmerge [tab number] [top|bottom|left|right] +Configuration: +The default window location can be set to top, bottom, left or right. + + let g:Tabmerge_default_window_location = 'top' + + The tab number can be "$" for the last tab. If the tab number isn't specified the tab to the right of the current tab is merged. If there is no right tab, the left tab is merged. The location specifies where in the current tab to merge the windows. Defaults to "top". diff --git a/plugin/Tabmerge.vim b/plugin/Tabmerge.vim index cb67cb4..e151c8d 100644 --- a/plugin/Tabmerge.vim +++ b/plugin/Tabmerge.vim @@ -25,6 +25,10 @@ if v:version < 700 finish endif +if !exists('g:Tabmerge_default_window_location') + let g:Tabmerge_default_window_location = 'top' +endif + command! -nargs=* Tabmerge call Tabmerge() function! Tabmerge(...) " {{{1 @@ -45,7 +49,7 @@ function! Tabmerge(...) " {{{1 endif if !exists('l:where') - let where = 'top' + let where = g:Tabmerge_default_window_location endif if !exists('l:tabnr')