Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 818 Bytes

vim-tip-make-arrows-behave-in-vim-like-in-a-gui-text-editor.md

File metadata and controls

23 lines (20 loc) · 818 Bytes

% Vim Tip: arrow keys % Hugo Roy % 2013-06-20 14:13:00

Make arrows behave in VIM like in a GUI text editor

This is wholly heretic to VIM purists, but I find it very useful for people who do use ↑ and ↓ keys and do not intend to use them as a replacement for k and j. Just add in your ~/.vimrc:

<script src="https://gist.github.com/hugoroy/5822226.js"></script>

" make arrows behave like gui text editor
nnoremap <up> gk
nnoremap <down> gj
inoremap <up> <C-O>gk
inoremap <down> <C-O>gj
vnoremap <up> gk
vnoremap <down> gj
most updated version on github