diff options
-rw-r--r-- | vimrc-full | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -286,8 +286,15 @@ else " default Vim? | |||
286 | autocmd BufWinLeave * call clearmatches() | 286 | autocmd BufWinLeave * call clearmatches() |
287 | endif | 287 | endif |
288 | 288 | ||
289 | menu &UI.&Open\ in\ Serversession | 289 | function! Refresh_server_list() |
290 | \ :execute ":bd<Bar>:call remote_send('GVIM', ':e ' . expand('#:p') . '\<CR\>')"<CR> | 290 | silent! unmenu! UI |
291 | menu &UI.refresh\ server\ list :call Refresh_server_list()<CR> | ||
292 | menu &UI.-Sep1- : | ||
293 | for s in split(serverlist(), '\n') | ||
294 | execute ':menu &UI.&Open\ in\ '.s." :execute \":bd<Bar>:call remote_send('".s."', ':e ' . expand('#:p') . '\\<CR\\>')<Bar>:call remote_foreground('".s."')\"<CR>" | ||
295 | endfor | ||
296 | endfunction | ||
297 | autocmd! VimEnter * call Refresh_server_list() | ||
291 | 298 | ||
292 | " scripts from the default vim installation, which do not get loaded by default, but are useful. | 299 | " scripts from the default vim installation, which do not get loaded by default, but are useful. |
293 | if filereadable($VIMRUNTIME.'/macros/editexisting.vim') | 300 | if filereadable($VIMRUNTIME.'/macros/editexisting.vim') |