I'm using xfce4-terminal.
I remapped most Alt+key combinations in a file that is loaded in the .virmc. The file (called alt_bindings.vim, only loaded in vim 8 terminal mode) is like this:
set <M-a>=^]a set <M-A>=^]A set <M-b>=^]b set <M-B>=^]B set <M-c>=^]c set <M-C>=^]C
etc for most keys. I excluded some combinations that gave me errors right away, such as
Then I have macros like this one:
"w 0vf'snno^I ^[lywio^[plxxx :set <80>kD<80>kD^[wwD<80>kd
^[ is Esc key, but the macro seems to trigger my defined keys instead, and it breaks the macro totally. For example,
^[plxxx would be Esc
plxxx that is: back to normal mode, paste, right, delete 3x. It does something else entirely instead (like inserting xxx and other chars). The problem goes away if I don't load those mappings.
I tried something like:
set <Alt>=^] set <M-A>=<Alt>A set <M-b>=<Alt>b set <M-B>=<Alt>B set <M-c>=<Alt>c set <M-C>=<Alt>C
But it doesn't work. I also tried something like:
set <t_F13>=^] set <M-A>=<t_F13>A set <M-b>=<t_F13>b set <M-B>=<t_F13>B set <M-c>=<t_F13>c set <M-C>=<t_F13>C
but weird stuff happens and keys don't work either.
I then used (taken from here):
let c='a' while c <= 'z' exec "set <M-".c.">=".c exec "nnoremap ".c." <M-".c.">" let c = nr2char(1+char2nr(c)) endw
it works, but it exhibits the same problem (broken macros).
Any help? Thanks.