comparison dot_config/nvim/init.vim @ 340:140a585c3393

Enable insert mode when entering a terminal
author zegervdv <zegervdv@me.com>
date Sat, 23 Jan 2021 16:39:57 +0100
parents 890fe7d01f19
children 111a00459ad9
comparison
equal deleted inserted replaced
339:308594cabf62 340:140a585c3393
395 tnoremap <C-j> <C-\><C-n><C-w>j 395 tnoremap <C-j> <C-\><C-n><C-w>j
396 tnoremap <C-k> <C-\><C-n><C-w>k 396 tnoremap <C-k> <C-\><C-n><C-w>k
397 tnoremap <C-l> <C-\><C-n><C-w>l 397 tnoremap <C-l> <C-\><C-n><C-w>l
398 augroup enter_term 398 augroup enter_term
399 au! 399 au!
400 au BufEnter * if &buftype == 'terminal' | :startinsert | endif 400 autocmd TermOpen * startinsert!
401 autocmd BufEnter * if &buftype ==# 'terminal' | :startinsert! | endif
402 autocmd BufLeave * if &buftype ==# 'terminal' | :stopinsert! | endif
401 augroup END 403 augroup END
402 let $GIT_EDITOR = 'nvr -cc split --remote-wait' 404 let $GIT_EDITOR = 'nvr -cc split --remote-wait'
403 endif 405 endif
404 406
405 " Open buffers, tags... in vertical splits 407 " Open buffers, tags... in vertical splits