Saturday, June 24, 2023

Re: t_fe and t_fd in tmux corrupts split with ^[[O

Enan Ajmain wrote:

> I have this in my vimrc according to ":h xterm-focus-event":
>
> if &term =~ '\v^(screen|tmux)'
> let &t_fe = "\<Esc>[?1004h"
> let &t_fd = "\<Esc>[?1004l"
> endif
>
> With it in tmux, when I switch panes, the pane with Vim running shows a
> control sequence "^[[O" where "^[" is Esc.

You need to tell Vim to recognize these escape sequences:

execute "set <FocusGained>=\<Esc>[I"
execute "set <FocusLost>=\<Esc>[O"

Since this is quite common it was made the default in patch 9.0.1619.
You only need to define the escape sequences for older Vim versions.


--
hundred-and-one symptoms of being an internet addict:
231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner
in the front doorway permanently so it always looks like you are
actually attempting to do something about that mess that has amassed
since you discovered the Internet.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230624183547.E884A1C054C%40moolenaar.net.

No comments: