While I see vim-rsi is correctly mapping <M-d>:
:verbose imap <m-d>
i ä * <C-O>dw
Last set from ~/.vim/.cache/neobundle/vim-rsi/plugin/rsi.vim
My $TERM/terminfo(?), prints ALT + D as ^]d, unsurprisingly typing the ä, results in the desired command. When running vim from an xterm, it correctly(?), maps ALT + D as ä.
It seems every other terminal emulator (rxvt, and almost everyone [if not all] based on the vte gtk widget) maps ALT + D as ^]d. Though, setting <M-d> as <esc>d, partially solves the problem:
execute "set <M-d>=\ed"
" I tried using \<Esc>, but it's too fast(?) and exists insert mode and let you in operator pending after inserting a `d`.
If I understand correctly, problem with that is that you use <M-d> fast enough (below ttimeoutlen?) the command gets executed as two: ^[, and d and you get out of insert mode and d is inserted in normal mode.
Anyway, I think a plausible workaround could be checking the term, and in case is not xterm, run that line. If you are interested I can do a PR.
While I see vim-rsi is correctly mapping
<M-d>:My $TERM/terminfo(?), prints ALT + D as
^]d, unsurprisingly typing theä, results in the desired command. When running vim from an xterm, it correctly(?), maps ALT + D asä.It seems every other terminal emulator (rxvt, and almost everyone [if not all] based on the vte gtk widget) maps ALT + D as
^]d. Though, setting<M-d>as<esc>d, partially solves the problem:If I understand correctly, problem with that is that you use
<M-d>fast enough (belowttimeoutlen?) the command gets executed as two:^[, anddand you get out of insert mode anddis inserted in normal mode.Anyway, I think a plausible workaround could be checking the term, and in case is not
xterm, run that line. If you are interested I can do a PR.