Skip to content

Instantly share code, notes, and snippets.

@emanon001
Created April 4, 2012 18:46
Show Gist options
  • Save emanon001/2304658 to your computer and use it in GitHub Desktop.
Save emanon001/2304658 to your computer and use it in GitHub Desktop.
Vim script: kr4mb sample.
let g:kr4mb_identifier_aliases = {
\ 'to_dvorak': 'private.remap.device_kinesis_qwerty2dvorak_qwerty'
\ }
command! -nargs=0 DvorakEnable
\ KR4MBEnable to_dvorak
command! -nargs=0 DvorakDisable
\ KR4MBDisable to_dvorak
command! -nargs=0 DvorakToggle
\ KR4MBToggle to_dvorak
nnoremap : :<C-u>DvorakEnable<CR>:
cnoremap <silent> <Esc> <C-u>DvorakDisable<CR>
augroup kr4mb-dvorak
autocmd!
autocmd InsertEnter * call kr4mb#enable('to_dvorak')
autocmd InsertLeave * call kr4mb#disable('to_dvorak')
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment