From 0e74b6f3a07655cf95e4ff172400efaa4a60f3ad Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 2 Nov 2017 20:16:24 +0100 Subject: Added menu to send a file to a vim server session --- vimrc-full | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/vimrc-full b/vimrc-full index 83edbfa..8475d0a 100644 --- a/vimrc-full +++ b/vimrc-full @@ -202,9 +202,9 @@ set cmdheight=2 | " sets the command line's height set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators set nocursorcolumn | " turn visual cursor column off (improves performance) set updatetime=80 | " updates the screen more often -set redrawtime=1000 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry +set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry set notimeout | " improves performance but is known to cause problems on slow terminals -set ttimeout ttimeoutlen=250 | " set esc key timeout in ms- +set ttimeout ttimeoutlen=150 | " set esc key timeout in ms- set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always set shortmess+=I | " don't give the intro message when starting Vim |:intro|. @@ -272,6 +272,10 @@ if has('nvim') " Neovim? " use default ESC key to leave insert mode in the internal terminal emulator tnoremap " set shada+=n~/.vim/shada | " shada file to use +" + menu &UI.&Open\ in\ Serversession + \ :execute ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.'):stopinsert:set readonly + else " default Vim? autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") @@ -287,6 +291,10 @@ else " default Vim? if version >= 702 " clean up (see: http://vim.wikia.com/wiki/VimTip396) autocmd BufWinLeave * call clearmatches() endif + + menu &UI.&Open\ in\ Serversession + \ :execute ":bd:call remote_send('GVIM', ':e ' . expand('#:p') . '\')" + endif @@ -582,10 +590,6 @@ if has("autocmd") 1000menu &Tag.stack.jump\ \:ta \ :ta - - menu &UI.&Open\ in\ Serversession - \ :execute ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.'):stopinsert:set readonly - endif -- cgit v1.2.3