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

Cursor fix just plain not working #10

Closed tangledhelix closed 9 years ago

tangledhelix commented 12 years ago

I get no change in the cursor when I install Vitality. I even went to this extent to test it without my config being in the way:

mv .vimrc .vimrc.old
mv .vim .vim.old
mkdir .vim ; cd .vim
git clone https://github.com/sjl/vitality.vim
mv vitality.vim/{doc,plugin} .
rm -rf vitality.vim

And... nothing. So it's presumably not something in my Vim config, which I temporarily erased… any ideas? I am not spotting any problems in Vitality, and I know the cursor can work (outside tmux) because my configs change the cursor.

Note: Vitality is not fixing the cursor for me even without tmux in use.

dmedvinsky commented 12 years ago

Are you running iTerm2? Does echo $ITERM_PROFILE give you an output?

tangledhelix commented 12 years ago

Run on my local system it does have a value. By the time I have ssh'd somewhere, no, that variable is no longer set.

I am using iTerm2 build 1.0.0.20120203 on Lion. The update check says that's the most recent version.

dmedvinsky commented 12 years ago

And you are running vim on the remote machine you ssh'd to? That's the problem then. Because this variable (ITERM_PROFILE) is how vitality checks if it's running inside of iTerm2.

I'm not sure if it will work in a remote Vim, but I guess nothing should prevent it from happening. To test it, could you run Vim on a remote machine with

ITERM_PROFILE=foo vim

command and see if vitality works?

tangledhelix commented 12 years ago

Setting ITERM_PROFILE does work. I looked through all of the iTerm2 settings and I see nowhere to export this value. The closest I could get was to "send text at start":

export ITERM_PROFILE="Solarized"

Which is … OK … it works, anyway.

I wouldn't mind seeing a way to turn this behavior off, for people who expect that they're always using iTerm2, to get around this issue. I might submit a pull request on that actually.