提交 844409c7 编写于 作者: C Cosmin Popescu

added tab switches between tabs

上级 27147aa2
......@@ -957,6 +957,8 @@ and
* `g:sw_sqlopen_command`: the vim command used by `SWSqlOpen` or
`SWSqlOpenDirect` commands to open a buffer; possible values: `e|tabnew`;
default value: "e", which means open with vim `edit` command
* `g:sw_tab_switches_between_bottom_panels`: if set to true, then clicking tab
in a db explorer will switch between the bottom panels
## Database explorer settings
......
......@@ -77,6 +77,20 @@ function! s:set_special_buffer(profile, connection)
endif
call s:iterate('s:add_shortcut')
if g:sw_tab_switches_between_bottom_panels
nmap <buffer> <tab> :call sw#dbexplorer#switch_bottom_panels()<cr>
endif
endfunction
function! sw#dbexplorer#switch_bottom_panels()
if exists('b:profile')
if bufname('%') == '__DBExplorer__-' . b:profile
call sw#goto_window('__SQL__-' . b:profile)
else
call sw#goto_window('__DBExplorer__-' . b:profile)
endif
endif
endfunction
function! s:get_panels()
......
......@@ -142,9 +142,14 @@ endif
if (!exists('g:sw_asynchronious'))
let g:sw_asynchronious = 0
if !exists('g:vim_exe')
let g:sw_vim_exe = 'vim'
endif
endif
if !exists('g:vim_exe')
let g:sw_vim_exe = 'vim'
endif
if !exists('g:sw_tab_switches_between_bottom_panels')
let g:sw_tab_switches_between_bottom_panels = 1
endif
"if !exists('g:sw_overwrite_current_command')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册