On 2020-05-21, Dominique Pellé wrote: > I can reproduce it with the latest vim-8.2.803 on > xubuntu-18.03, with xfce4-terminal and gnome-terminal, > which print: > > $ ./vim --clean -c ':call setline(1, "echo hello")' -c 'w !bash' > > �[>4;mhello > > > And also with xterm which prints ello instead of hello: > > $ ./vim --clean -c ':call setline(1, "echo hello")' -c 'w !bash' > > ello
I haven't reproduced the "ello" problem, but I do observe the "[>4;m" problem. I observe it when using GNOME Terminal, but not when using xterm or mintty. The "<esc>[>4;m" sequence is the modifyOtherKeys reset sequence. According to a number of articles found on the Web*, GNOME Terminal does not support modifyOtherKeys and is not likely to. xfce4-terminal returns the same v:termresponse sequence as GNOME Terminal, so I would expect xfce4-terminal to have the same shortcomings as GNOME Terminal. If Vim is going to continue to support modifyOtherKeys, then it should identify terminals that don't support it and not send that sequence to those terminals. In my experience, v:termresponse has been a reliable indicator of actual terminal type. The problem with it is that Vim doesn't know its value until after vimrc has been processed, so one has to defer some terminal-dependent processing to a TermResponse autocommand, which has its own problems. What I do is have my ~/.bashrc query the terminal for its termresponse, save that in the environment variable TERMRESPONSE, and use that value to make terminal-dependent selections in my vimrc and color scheme files. Alternatively, a GNOME Terminal user could set TERM=gnome, which is supposed to be a more accurate terminfo entry for a GNOME Terminal. The user could set TERM=gnome if COLORTERM=gnome-terminal. Vim could then use TERM=gnome or COLORTERM=gnome-terminal as a condition for disabling modifyOtherKeys. I've been testing this on an Ubuntu 18.04 system with Vim 8.2.803, xterm version 344 and GNOME Terminal version 3.28.2, as well as remotely over ssh from a Windows 10 system running Cygwin with mintty 3.1.5. Regards, Gary ---------- * https://unix.stackexchange.com/questions/165104/does-gnome-terminal-have-an-equivalent-for-xterms-modifyotherkeys https://bugzilla.gnome.org/show_bug.cgi?id=477068 https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/96676 https://invisible-island.net/xterm/xterm.faq.html#bug_gnometerm -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20200526074730.GG8832%40phoenix.
