Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<F24><F25> pasted #6

Open
mrmuskrat opened this issue Jan 6, 2016 · 2 comments
Open

<F24><F25> pasted #6

mrmuskrat opened this issue Jan 6, 2016 · 2 comments

Comments

@mrmuskrat
Copy link

Normally everything works well. If I'm in insert paste mode (':set paste' followed by 'i') then switch windows/panes and come back to vim <F24><F25> are pasted at the cursor location. I don't know enough about Vim remaps to know if this is normal or how to fix it (apart from remembering not to enable paste mode until I need it).

@hjanuschka
Copy link

old issue but i stumbled upon the same issue.

adding this to my vimrc fixed it

 " When Tmux 'focus-events' option is on, Tmux will send <Esc>[O when the
  " window loses focus and <Esc>[I when it gains focus.
exec "set <F24>=\<Esc>[O"
exec "set <F25>=\<Esc>[I"

found in: https://github.com/tmux-plugins/vim-tmux-focus-events/blob/master/plugin/tmux_focus_events.vim

@captainfffsama
Copy link

= =|||
I try add

 " When Tmux 'focus-events' option is on, Tmux will send <Esc>[O when the
  " window loses focus and <Esc>[I when it gains focus.
exec "set <F24>=\<Esc>[O"
exec "set <F25>=\<Esc>[I"

but it doesnt work,so I have to set no paste for default,and map use F10 to switch the paste mode.
I add the following code in my vimrc:

" set paste " 直接这样设置在tmux中使用会导致失焦插入<F24><F25>
set pastetoggle=<F10>

after set this,when I need paste ,just push F10,after I finish paste,F10 again can help me back to the normal insert mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants