gioele / vim-autoswap

Please Vim, stop with these swap file messages. Just switch to the correct window!
Creative Commons Zero v1.0 Universal
115 stars 25 forks source link

No more need for setting the terminal's window title #7

Closed ssiegel closed 8 years ago

ssiegel commented 8 years ago

Detect the window id by finding vim's pid (as for tmux), then inspect its environment to get the value of WINDOWID.

gioele commented 8 years ago

Thank you for the patch. Unfortunately I cannot include it because it does not take into account a use case: when typing vim launches gvim, as it is the case when one uses the vim-veryvisual plugin. In that case WINDOWID contains the ID of the terminal that launched gvim, not gvim's window.

ssiegel commented 8 years ago

I added some logic for gVim, I hope this is acceptable now.

gioele commented 8 years ago

I had to do some adjustments to make it work on Ubuntu 14.04. Could you please have a look at the branch ssiegel-use-procfs and test if it works for you?

ssiegel commented 8 years ago

Vim does not start the server by default if it is running in a terminal, so we need the fallback. After changing that it works as expected :smiley: