63 lines
918 B
VimL
63 lines
918 B
VimL
scriptencoding utf-8
|
|
let s:save_cpo = &cpo
|
|
set cpo&vim
|
|
|
|
let s:emacs = {
|
|
\ "name" : "KeyMapping_emacs_like"
|
|
\}
|
|
|
|
function! s:emacs.keymapping(cmdline)
|
|
return {
|
|
\ "\<C-f>" : {
|
|
\ "key" : "\<Right>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-b>" : {
|
|
\ "key" : "\<Left>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-n>" : {
|
|
\ "key" : "\<Down>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-p>" : {
|
|
\ "key" : "\<Up>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-a>" : {
|
|
\ "key" : "\<Home>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-e>" : {
|
|
\ "key" : "\<End>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<C-d>" : {
|
|
\ "key" : "\<Del>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ "\<A-d>" : {
|
|
\ "key" : "\<C-w>",
|
|
\ "noremap" : 1,
|
|
\ "lock" : 1,
|
|
\ },
|
|
\ }
|
|
endfunction
|
|
|
|
|
|
function! s:make_emacs()
|
|
return deepcopy(s:emacs)
|
|
endfunction
|
|
|
|
|
|
|
|
let &cpo = s:save_cpo
|
|
unlet s:save_cpo
|