diff options
| author | Max Christian Pohle | 2017-11-03 01:46:13 +0100 | 
|---|---|---|
| committer | Max Christian Pohle | 2017-11-03 01:46:13 +0100 | 
| commit | 694a8236d1418c51cafeefcbbdaa0c76844a6a0a (patch) | |
| tree | a25d3e352b45dd86abf8b0cf391d0763b992c3a3 | |
| parent | c838cbbf34b66fcc5ec47e8a7262e7458d41cd85 (diff) | |
| download | vim-karlmarks-694a8236d1418c51cafeefcbbdaa0c76844a6a0a.tar.bz2 vim-karlmarks-694a8236d1418c51cafeefcbbdaa0c76844a6a0a.zip  | |
Send files from one session to another using the menu
| -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') | 
