vim exit terminal-mode to normal mode with sane keys
This commit is contained in:
parent
836aa54216
commit
3cef2a5672
|
@ -74,6 +74,15 @@ map <Leader>" :vsplit<CR>
|
||||||
" split with <Leader>, then %"
|
" split with <Leader>, then %"
|
||||||
map <Leader>% :split<CR>
|
map <Leader>% :split<CR>
|
||||||
|
|
||||||
|
" automatically enter insert mode on new neovim terminals
|
||||||
|
augroup terminal
|
||||||
|
au TermOpen * startinsert
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" enter normal mode from terminal-emulator with <C-w>
|
||||||
|
inoremap <C-w> <Esc>
|
||||||
|
tnoremap <C-w> <C-\><C-n>
|
||||||
|
|
||||||
" :W to write file as root"
|
" :W to write file as root"
|
||||||
command W :SudaWrite
|
command W :SudaWrite
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,15 @@ map <Leader>" :vsplit<CR>
|
||||||
" split with <Leader>, then %"
|
" split with <Leader>, then %"
|
||||||
map <Leader>% :split<CR>
|
map <Leader>% :split<CR>
|
||||||
|
|
||||||
|
" automatically enter insert mode on new neovim terminals
|
||||||
|
augroup terminal
|
||||||
|
au TermOpen * startinsert
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" enter normal mode from terminal-emulator with <C-w>
|
||||||
|
inoremap <C-w> <Esc>
|
||||||
|
tnoremap <C-w> <C-\><C-n>
|
||||||
|
|
||||||
" :W to write file as root"
|
" :W to write file as root"
|
||||||
command W :SudaWrite
|
command W :SudaWrite
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ map <Leader>" :vsplit<CR>
|
||||||
" split with <Leader>, then %"
|
" split with <Leader>, then %"
|
||||||
map <Leader>% :split<CR>
|
map <Leader>% :split<CR>
|
||||||
|
|
||||||
|
" enter normal mode from terminal-emulator width <ESC>
|
||||||
|
tnoremap <Esc> <C-\><C-n>
|
||||||
|
|
||||||
" :W to write file as root"
|
" :W to write file as root"
|
||||||
command W :w ! sudo tee %
|
command W :w ! sudo tee %
|
||||||
" Set completeopt to have a better completion experience"
|
" Set completeopt to have a better completion experience"
|
||||||
|
|
Loading…
Reference in New Issue