Skip to content

Instantly share code, notes, and snippets.

@Prodge
Last active June 21, 2022 09:11
Show Gist options
  • Save Prodge/a6347a4ca986058a7b3fbe20bfd9c578 to your computer and use it in GitHub Desktop.
Save Prodge/a6347a4ca986058a7b3fbe20bfd9c578 to your computer and use it in GitHub Desktop.
Vim hjkl navigation remapping for dvorak users
" Add this to your vimrc
" New mappings: c
" h t n
" This also integrates this mapping into insert mode via <Alt>
"Navigation for dvorak
nnoremap c k
nnoremap t j
nnoremap n l
vnoremap c k
vnoremap t j
vnoremap n l
"Add a new mapping for 'n' as we just replaced it
nnoremap g n
"Provide chtn / hjkl movements in Insert mode via the <Alt> modifier key
inoremap <A-h> <C-o>h
inoremap <A-t> <C-o>j
inoremap <A-c> <C-o>k
inoremap <A-n> <C-o>l
"Shift navigation jumping movements for chtn
nnoremap H <C-Left>
nnoremap N <C-Right>
inoremap <A-H> <C-Left>
inoremap <A-N> <C-Right>
@BahaTanvir
Copy link

There is a problem with c as c isn't replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment