diff --git a/pkgs/neovim/default.nix b/pkgs/neovim/default.nix index f60ba99334f76f6e4daf0e7c7a36b11fe7c83ca4..2918e9f6643c4b379d13069de0e2fc019c5d6103 100644 --- a/pkgs/neovim/default.nix +++ b/pkgs/neovim/default.nix @@ -43,6 +43,20 @@ pkgs.neovim.override { " Save with Ctrl-S (if file has changed) noremap <c-s> <Cmd>update<CR> + " Use `ALT+{h,j,k,l}` to navigate windows from any mode + :tnoremap <A-h> <C-\><C-N><C-w>h + :tnoremap <A-j> <C-\><C-N><C-w>j + :tnoremap <A-k> <C-\><C-N><C-w>k + :tnoremap <A-l> <C-\><C-N><C-w>l + :inoremap <A-h> <C-\><C-N><C-w>h + :inoremap <A-j> <C-\><C-N><C-w>j + :inoremap <A-k> <C-\><C-N><C-w>k + :inoremap <A-l> <C-\><C-N><C-w>l + :nnoremap <A-h> <C-w>h + :nnoremap <A-j> <C-w>j + :nnoremap <A-k> <C-w>k + :nnoremap <A-l> <C-w>l + " Always show the sign column (to prevent jumps when loading git- or the language client) " Disabled because it also adds a sign column to NERDTree "set signcolumn=yes