diff options
Diffstat (limited to 'plugin/terminal.vim')
-rw-r--r-- | plugin/terminal.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin/terminal.vim b/plugin/terminal.vim new file mode 100644 index 0000000..c8f02fd --- /dev/null +++ b/plugin/terminal.vim | |||
@@ -0,0 +1,19 @@ | |||
1 | augroup TERMINAL | ||
2 | " Vim 8 has a terminal command... | ||
3 | if has('terminal') | ||
4 | " use default ESC key to leave insert mode in the internal terminal emulator | ||
5 | tnoremap <Esc> <C-W>N | ||
6 | " make terminal windows hidden by default (copied from :help terminal) | ||
7 | autocmd BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide | endif | ||
8 | endif | ||
9 | |||
10 | " NEOVIM_incompatible: | ||
11 | if has('nvim') " Neovim? | ||
12 | autocmd TermOpen term://* set nobuflisted | ||
13 | " use default ESC key to leave insert mode in the internal terminal emulator | ||
14 | tnoremap <Esc> <C-\><C-n> | ||
15 | |||
16 | menu &UI.&Open\ in\ Serversession | ||
17 | \ :execute ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.')<CR>:stopinsert<CR>:set readonly<CR> | ||
18 | endif | ||
19 | augroup END | ||