Saturday 25 August 2018

Is there a --remote option for vim (not gVim) in cygwin?


I am trying to open a file in a new tab in an already running console Vim session. This functionality is available in gVim via the --remote-tab-silent option.


If this is not possible, is there a work around?



Answer



If you have Vim compiled with +clientserver, and you run Cygwin's X server, and you invoke console Vim with a --servername argument, then yes. See:


:help clientserver
:help --servername

Example:


vim --servername vim
vim --remote-tab-silent foo

When you install Cygwin's version of gVim, it should create a symbolic link from /bin/vim to /usr/bin/gvim, which means you will have +clientserver and you can use this functionality in console vim.


The reason the X server is required is that "Unix" variants of Vim use X's security protocols and interprocess communication to implement the +clientserver features. The question is whether you want to have to run Cygwin's X server just to get this functionality.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...