diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 17:09:37 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 17:09:37 +0100 |
commit | e642aec221c289ef93772606bb7d50b0bfd0c410 (patch) | |
tree | 4140ed40416e73592093cb615a2bbd2f06b86c70 | |
parent | 3e74bff730459b7efd51f971a3602792510a8db9 (diff) |
Improve navigation between windows in vim/nvim
Especially eases handling of terminal windows in nvim
-rw-r--r-- | vimrc | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,5 +1,5 @@ " vimrc of Johannes Ranke -" Last Change: Sat Nov 12, 2016 at 09:43 PM +0100 +" Last Change: Tue Nov 15, 2016 at 08:11 AM +0100 " default settings (much is handled by tpope/sensible) {{{1 set ts=2 set sw=2 @@ -110,4 +110,16 @@ call airline#parts#define_function('syntax', 'SyntaxItem') let g:airline_section_x=airline#section#create_right(['syntax', 'filetype']) " Always show statusline {{{1 set laststatus=2 +" Mappings for easier navigation of windows {{{1 +" From :help terminal-emulator-input in neovim +nnoremap <A-h> <C-w>h +nnoremap <A-j> <C-w>j +nnoremap <A-k> <C-w>k +nnoremap <A-l> <C-w>l +if has('nvim') + 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 +endif " {{{1 vim: foldmethod=marker foldlevel=0 ts=2 sw=2 expandtab |