I tried to fix by using self.event.toXVimString but I could not find the way to get characters with modifier (∆/˚/˙/¬) from raw keys (j/k/h/l). So we should choose one of below to solve this.
Always not to translate to characters with modifier. So Option+j will insert j. (cons: cannot insert ∆/˚/˙/¬/etc. anymore)
Pass through inserted text if there is no mapping defined in vim side. (cons: inoremap <M-j> <M-j> will insert j, not ∆.)
I often use Alt+j/k/h/l to exit insert mode on regular vim.
But with XVim2 mapping on <M-...> in insert mode (like
inoremap <M-j> <Esc>j
) does not work.It is because passing ∆/˚/˙/¬ to handleXVimString method, instead of raw key j/k/h/l with modifier flag. https://github.com/XVimProject/XVim2/blob/6356710fdf4a7edc816d49474ad6c415afc70897/XVim2/XVim/XVimWindow.m#L417
I tried to fix by using
self.event.toXVimString
but I could not find the way to get characters with modifier (∆/˚/˙/¬) from raw keys (j/k/h/l). So we should choose one of below to solve this.inoremap <M-j> <M-j>
will insert j, not ∆.)