You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
" I don't known why this line not work..., it seems a bug
"tnoremap <M-.> <C-w>:<C-u>call term_sendkeys(bufnr('%'), "\<Esc>.")<CR>
tnoremap <silent> <M-.> <C-w>:call <SID>tmap_meta('.')<CR>
function s:tmap_meta(key)
call term_sendkeys(bufnr('%'), "\<Esc>" . a:key)
endfunction
Reacted by Anton Styagun, Qi Luo and C.D. MacEachern
Oh I see, basically the shell you were using was expecting Meta-<key> sequence to be encoding as <Esc> + <key>, which is how most shells work, but in GVim (and MacVim under macmeta) it uses 8-bit encoding (do :h xterm-8bit) so it's not really compatible.
This ties to a larger ongoing issue about how Vim should be handling meta keys and would need some thought and collaboration with Vim to figure this out. I think for now you will need to keep your workaround.
Activity
ychin commentedon Feb 22, 2019
Hmm what's the issue here? What shell are you using and what were you expecting?
ychin commentedon Feb 22, 2019
Also, do you have
set macmeta? Does setting that help?epheien commentedon Feb 22, 2019
Finnally,I found a solution:
ychin commentedon Feb 22, 2019
Oh I see, basically the shell you were using was expecting Meta-
<key>sequence to be encoding as<Esc>+<key>, which is how most shells work, but in GVim (and MacVim undermacmeta) it uses 8-bit encoding (do:h xterm-8bit) so it's not really compatible.This ties to a larger ongoing issue about how Vim should be handling meta keys and would need some thought and collaboration with Vim to figure this out. I think for now you will need to keep your workaround.
Keeping this issue open for tracking.