sjl / vitality.vim

Make Vim play nicely with iTerm 2 and tmux.
http://github.com/sjl/vitality.vim
MIT License
320 stars 30 forks source link

Issue changing tabs in iTerm #24

Open karptonite opened 10 years ago

karptonite commented 10 years ago

When changing tabs in iTerm with the hot keys, I see escape sequences printed into the vim window. ^]]0 and ^]]I, I believe. Since I'm currently using vitality just to fix the cursor, I just changed enable_focus_reporting and disable_focus_reporting to "" in a fork.

I'm using xterm-256color for my terminal, if that makes a difference. I saw that there was a TODO in the code, "Look into how this works with iTerm tabs. Seems a bit wonky."--I'm guessing this is related?

keith commented 10 years ago

Related to #19 you can disable the FocusGained and FocusLost features by using:

let g:vitality_fix_focus = 0

Note that you have to do this before sourcing the plugin.

phs commented 7 years ago

I believe I've fixed the underlying wonkiness in iTerm2, see this iTerm2 PR and issue. Feel free to see if the fix (which requires compiling iTerm2) works for you.