commit 03bb622c95def433535dd97838cd19038e608cac parent c14305ac97f50595fcc17174a33e051d96246fee Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe> Date: Mon, 23 May 2022 20:22:03 -0500 Disable some keys Diffstat:
| M | vimrc | | | 42 | ++++++++++++++++++++++++------------------ |
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/vimrc b/vimrc @@ -29,29 +29,35 @@ set list autocmd BufWinLeave *.* mkview -" To avoid some keys -nnoremap <Left> :echo "Use h"<CR> -nnoremap <Right> :echo "Use l"<CR> -nnoremap <Up> :echo "Use k"<CR> -nnoremap <Down> :echo "Use j"<CR> +" Annoying when accidentally press Ctrl-Space +inoremap <C-@> <NOP> + +" Arrows +nnoremap h $ +nnoremap l 0 +nnoremap j gg +nnoremap k G +nnoremap <Left> $ +nnoremap <Right> 0 +nnoremap <Up> G +nnoremap <Down> gg nnoremap <BS> :echo "Use C-h"<CR> -vnoremap <Left> :<C-u>echo "Use h"<CR> -vnoremap <Right> :<C-u>echo "Use l"<CR> -vnoremap <Up> :<C-u>echo "Use k"<CR> -vnoremap <Down> :<C-u>echo "Use j"<CR> +vnoremap <Left> $ +vnoremap <Right> 0 +vnoremap <Up> G +vnoremap <Down> gg vnoremap <BS> :<C-u>echo "use C-h"<CR> -inoremap <Left> <C-o>:echo "No left for you!"<CR> -inoremap <Right> <C-o>:echo "No right for you!"<CR> -inoremap <Up> <C-o>:echo "No up for you!"<CR> -inoremap <Down> <C-o>:echo "No down for you!"<CR> +inoremap <Left> <C-o>$ +inoremap <Right> <C-o>0 +inoremap <Up> <C-o>G +inoremap <Down> <C-o>gg inoremap <BS> <C-o>:echo "Use C-h"<CR> cnoremap <BS> <NOP> -inoremap <C-@> <NOP> -nnoremap h $ -nnoremap l 0 -nnoremap j gg -nnoremap k G +" Windows +nnoremap <C-W><C-W> <NOP> + +" Commands cabbrev wq echo 'Use ZZ' cabbrev q! echo 'Use ZQ' cabbrev q echo 'Use ZQ'