augroup TERMINAL " Vim 8 has a terminal command... if has('terminal') " use default ESC key to leave insert mode in the internal terminal emulator tnoremap N " make terminal windows hidden by default (copied from :help terminal) autocmd BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide | endif endif " NEOVIM_incompatible: if has('nvim') " Neovim? autocmd TermOpen term://* set nobuflisted " use default ESC key to leave insert mode in the internal terminal emulator tnoremap menu &UI.&Open\ in\ Serversession \ :execute ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.'):stopinsert:set readonly endif augroup END