From d9c9780223f6627eec17ec1b2f418aae14880e39 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Mon, 30 Mar 2020 15:57:58 +0530 Subject: [PATCH] nvim: Use window number information for window navigation Airline section y is used for file encoding and file format. We do not need this information in status line. Use it to show window number. Use window numbers for navigation. See :h CTRL-W_W and :h winnr() for more information. Signed-off-by: Sanchayan Maity --- nvim/.config/nvim/init.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 1f7d9b6..2860489 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -316,10 +316,9 @@ nnoremap Lt :call ToggleLocationList() " Key Bindings to help with terminal mode :tnoremap jk " Key bindings to move between window splits -nnoremap gh h -nnoremap gj j -nnoremap gk k -nnoremap gl l +for key in range(0, 9) + execute 'nnoremap '.key key.'w' +endfor " Disable Arrow Keys inoremap @@ -591,11 +590,12 @@ let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline#extensions#tabline#right_sep = ' ' let g:airline#extensions#tabline#right_alt_sep = '|' let g:airline#extensions#tabline#formatter = 'default' +let g:airline#extensions#tabline#buffer_nr_show = 1 let g:airline_left_sep = ' ' let g:airline_left_alt_sep = '|' let g:airline_right_sep = ' ' let g:airline_right_alt_sep = '|' -let g:airline#extensions#tabline#buffer_nr_show = 1 +let g:airline_section_y = '%{winnr()}' " Let vim-gitgutter do its thing on large files let g:gitgutter_max_signs=1000