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

Bug with Neovim #10

Closed innateessence closed 6 years ago

innateessence commented 7 years ago

When using vim it works great, Unfortunately when using neovim however, it doesn't focus on the currently open session (It detects a swap file and alerts me it's opening in read-only mode as if it can't see the other instance of neovim editing the file)

gioele commented 7 years ago

Hi @JackofSpades707, thank you for your bug report. I have never used neovim, so I'll have to guess what is going on.

Are you using Mac OS by any chance? The Mac OS part of vim-autoswap runs this AppleScript code:

tell application "Terminal" to every window whose (
    name begins with "'.shortname.' " and
    name ends with "VIM"
)

Maybe the title of the Terminal ends with something different than "VIM".

Could you please check?

innateessence commented 7 years ago

Thanks for getting back to me so quickly. :) I apologize for the lack of context, I am running ArchLinux, kernel : 4.8.13-1-ARCH,

Neovim version : 0.1.7-1 Deps installed : python-neovim & xclip

here's a copy of my current init.vim (aka ~/.vimrc for neovim) http://pastie.org/private/hxwxhuxpz97vjybaof8qua#12 (I apologize for it being messy, I do plan on cleaning it up)

For more NeoVim Specifics, This may be relevant : https://github.com/neovim/neovim/issues/2127

gioele commented 6 years ago

Hi @JackofSpades707, I think the cause of problem is just that neovim does not enable the title option by default, at least in the current stable version (0.1.7). I added some notes to the documentation.

Try enabling title with set title. Everything should work fine then. If this is not the case, please reopen this issue.

Thank you for the bug report.