i've added to my vimrc the possibility to move lines (on visual, on normal and insert mode) in file with alt+j or alt+k and it's working as expected.
in my .vimrc
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
My problem :
in insert mode : if I enter "ê" i have the lines on top my cursor that are getting deleted.
If i look at my vim mappings(:map) i can find the following lines:
v ë * :m '<-2<CR>gv=gv
v ê * :m '>+1<CR>gv=gv
n ë * :m .-2<CR>==
n ê * :m .+1<CR>==
My question:
- How is it possible that the mapping to move lines which involve alt, j, k creates a mapping for ë and ê.
- How can avoid to have ê and ë to be mapped as they are ?
thank you.