]> git.rmz.io Git - dotfiles.git/commitdiff
vim: don't allow arrows anywhere
authorSamir Benmendil <samir.benmendil@gmail.com>
Tue, 20 May 2014 08:46:38 +0000 (09:46 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Tue, 20 May 2014 09:09:32 +0000 (10:09 +0100)
move around with ^{hjkl}

vim/vimrc

index 033b90d0bfaabea9490e63195646298a853a6e1f..a32bbe664221562fc2385cb937d5f2e5ec44dff1 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -65,15 +65,24 @@ nmap <silent> <Leader>n :silent nohl<CR>
 nmap <Leader># :%s:<C-R>/::gn<CR>
 " center cursor after search
 nnoremap n nzz
+
 " disable arrows
-inoremap <Up> <NOP>
-inoremap <Down> <NOP>
-inoremap <Left> <NOP>
+noremap  <Up>    <NOP>
+noremap  <Down>  <NOP>
+noremap  <Left>  <NOP>
+noremap  <Right> <NOP>
+inoremap <Up>    <NOP>
+inoremap <Down>  <NOP>
+inoremap <Left>  <NOP>
 inoremap <Right> <NOP>
-noremap <Up> <NOP>
-noremap <Down> <NOP>
-noremap <Left> <NOP>
-noremap <Right> <NOP>
+cnoremap <Up>    <NOP>
+cnoremap <Down>  <NOP>
+cnoremap <Left>  <NOP>
+cnoremap <Right> <NOP>
+cnoremap <C-K>   <Up>
+cnoremap <C-J>   <Down>
+cnoremap <C-H>   <Left>
+cnoremap <C-L>   <Right>
 
 set nostartofline       " don't  move the cursor to the first non-blank char of a line
 set path=.,include/,../include/,/usr/include/c++/*,/opt/ros/hydro/include