vimrc: fix meta (here alt) keys

This commit is contained in:
surtur 2021-11-10 01:26:02 +01:00
parent 3122079ebf
commit 67c5365a5d
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -542,5 +542,16 @@ highlight ColorColumn ctermbg=0
set cursorlineopt=number set cursorlineopt=number
syntax sync minlines=256 syntax sync minlines=256
" fix meta-keys which generate <Esc>a .. <Esc>z
let c='a'
while c <= 'z'
exec "set <M-".toupper(c).">=\e".c
exec "imap \e".c." <M-".toupper(c).">"
let c = nr2char(1+char2nr(c))
endw
set <M-A>=a
imap a <M-A>
nnoremap <Leader>ve :e $MYVIMRC<CR> nnoremap <Leader>ve :e $MYVIMRC<CR>
nnoremap <Leader>vr :source $MYVIMRC<CR> nnoremap <Leader>vr :source $MYVIMRC<CR>