Configure terminal-config of vim to be compatible between vim and nvim as far as possible

This commit is contained in:
2022-09-25 02:25:28 +02:00
parent 8ee1098593
commit d836fff263

6
.vimrc
View File

@@ -143,6 +143,12 @@ nnoremap gv :vertical wincmd f<CR>
" Open shell with Ctrl+d to enable a toggle between a shell and vim " Open shell with Ctrl+d to enable a toggle between a shell and vim
nnoremap <silent> <C-d> :botright terminal ++close<CR> nnoremap <silent> <C-d> :botright terminal ++close<CR>
inoremap <silent> <C-d> <Esc>:botright terminal ++close<CR> inoremap <silent> <C-d> <Esc>:botright terminal ++close<CR>
" nvim uses a different terminal approach more vim-like actually :-P
if has('nvim')
nnoremap <silent> <C-d> :botright :split term://bash<CR>i
inoremap <silent> <C-d> <Esc>:botright :split term://bash<CR>i
tnoremap <Esc> <C-\><C-n>
endif
" Handle nerdtree and other utility-windows " Handle nerdtree and other utility-windows
nnoremap <Leader>n :NERDTreeFocus<CR> nnoremap <Leader>n :NERDTreeFocus<CR>