1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:40:05 +08:00

feat(ssh): change ssh tab name to SSH(user@ip:port)

This commit is contained in:
Shidong Wang 2021-10-28 17:21:38 +08:00
parent d969cf80f6
commit 93d8a15363
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -48,6 +48,10 @@ function! SpaceVim#layers#ssh#set_variable(opt) abort
endfunction
function! SpaceVim#layers#ssh#connect() abort
" the ssh client should be opened on new tab
tabnew
" set the tab name to SSH(user@ip:port)
let t:_spacevim_tab_name = 'SSH(' . s:user . '@' . s:ip . ':' . s:port . ')'
if has('nvim')
call termopen([s:ssh, '-p', s:port, s:user . '@' . s:ip])
else