I would like to be able to configure the meta key prefix to use something other than ESC, since that can cause confusion in vi (timing problem when typing too fast). The attached patch adds an “ap=...” option to the termcap configuration file for this purpose.
~/.mlterm/termcap should be used to manage differences between
terminal types such as xterm, rxvt, kterm, mlterm and so on.
I added --metaprefix ("mod_meta_prefix") option by trial instead.
If you want to use \eM as the meta key prefix, add
"mod_meta_prefix = \eM" to ~/.mlterm/main.
(http://bitbucket.org/arakiken/mlterm/get/default.tar.gz)
But I'm not sure whether this option is really necessary or not.
For example, following 1) or 2) seems useful in some situations.
I'd like to know concretely what is timing problem you mention.
1) Setting in ~/.vimrc as follows enables vim to distinguish single ESC
(exit from insert-mode) from ESC which is a part of control sequence
without configuring timeout in ~/.vimrc.
let &t_SI .= "\e[?7727h"
let &t_EI .= "\e[?7727l"
inoremap <special> <Esc>O[ <Esc>
2) Adding Mod+X settings to ~/.mlterm/key as follows.
Mod+a="\eMa"