diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 1726e94..c9ae8ec 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -74,6 +74,15 @@ map " :vsplit " split with , then %" map % :split +" automatically enter insert mode on new neovim terminals +augroup terminal + au TermOpen * startinsert +augroup END + +" enter normal mode from terminal-emulator with +inoremap +tnoremap + " :W to write file as root" command W :SudaWrite diff --git a/home/.config/nvim/noplug.vim b/home/.config/nvim/noplug.vim index 635ea6d..0cf108b 100644 --- a/home/.config/nvim/noplug.vim +++ b/home/.config/nvim/noplug.vim @@ -74,6 +74,15 @@ map " :vsplit " split with , then %" map % :split +" automatically enter insert mode on new neovim terminals +augroup terminal + au TermOpen * startinsert +augroup END + +" enter normal mode from terminal-emulator with +inoremap +tnoremap + " :W to write file as root" command W :SudaWrite diff --git a/home/.vimrc b/home/.vimrc index f98fcb0..bb3dd4e 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -66,6 +66,9 @@ map " :vsplit " split with , then %" map % :split +" enter normal mode from terminal-emulator width +tnoremap + " :W to write file as root" command W :w ! sudo tee % " Set completeopt to have a better completion experience"