Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Modify to communicate with Vim via client-server functionality #282
Currently it seems that PeepOpen is shelling vim/macvim to get it to open the file. That is why they always open in a new window/tab.
Using the client-server functionality of Vim (the server name could be sent to PeepOpen when it is launched from Vim) it should be possible to call a function in Vim with the path of the file to be opened.
Once that change is done then many other Vim related issues/feature requests could be implemented:
The launching command would send a hint to PeepOpen, and when PeepOpen calls back it could provide that hint back, allowing the appropriate dispatch.
I've experimented with this in the past and wasn't able to get it to work reliably.
Would everyone need to launch vim or mvim with the script that sets the name of the server? I'd like to make this work without changing developers' existing workflows.
However, this could make a way for PeepOpen to work with terminal vim, which would be really cool. It could be enough to make me switch from Emacs to Vim. ;-)
Also, MacVim already has a setting that basically fixes the main problem by opening files in the current window: