The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [clientserver]

The clientserver feature allows Vim to accept & execute commands from another process.

Filter by
Sorted by
Tagged with
1
vote
1answer
30 views

How do I open a tag in an existing gvim instance?

On windows I use gvim, and like to keep just one gvim instance running. Most of the time I open files like this: gvim -p --remote-tab-silent FILES. However, sometimes I want to open a tag in that same ...
1
vote
1answer
32 views

Why is :execute required in this --remote-silent command?

Let's say I want to jump to a particular position in a file in an existing Vim server: This command jumps to the correct line, but not the correct column, leaving the cursor at the start of the line: ...
1
vote
1answer
70 views

remote scrollbind with an offset (to increase the viewing area, over two screens)

Could I just duplicate what scrollbind does, and use tmux to send-keys to the other vim? I have vim on an android device (in termux), and want the effect of spreading vim over another device's ...
0
votes
2answers
156 views

Is there a workflow to preview javascript/html/css projects inside the browser? [closed]

Is there a way to preview js/html/css projects inside a browser, just like the Atom-Live-Server. So, I am after a server-client way of doing this, I mean in realtime as the files are being edited. ...
1
vote
1answer
32 views

How to send literal form of special key sequences with --remote-send

I am using vim --remote-send. As per the documentation It automatically expands "special" key signifiers, so that e.g. vim --remote-send "<C-t>" simulates pressing ctrl-t. I would like to send ...
1
vote
0answers
123 views

How to use JabRef with neovim without the --servername option?

I'm using vim with latex to create documents and I insert references using JabRef and create a bibliography. I can't use --servername in neovim (needed for JabRef). Any suggestions on how to make ...
1
vote
2answers
902 views

Vim not starting server

Context: I'm trying to use vim's clientserver mode on Mac OS X, using iterm2. I've compiled vim with clientserver via brew, and I've got XQuartz installed also. This is to allow continuous ...
0
votes
1answer
170 views

Vim's remote-send, without intermediate redraws?

I'm using Vim as a (debugger) frontend, but am bothered by the "flickering" screens when sending multiple commands at once. My current setup already uses lazyredraw that should work for functions. I ...
1
vote
0answers
49 views

Can I detect vim is in debugger mode through --remote-expr?

In general I can programmatically detect the active mode on a vim instance using $ vim --remote-expr 'mode(1)' but when vim is in debugger mode (i.e., it has hit a breakpoint placed via :breakadd), ...
0
votes
1answer
30 views

Read, compose and send zimbra emails from vim

I live most of my working hours inside vim. My institution uses an email client server provided by zimbra. The email domain starts with zimbra***inst.fr. Is there a way to read, compose and send ...
9
votes
3answers
779 views

In neovim, how can I share registers between editor instances?

I know that vim had the client/server divide that allowed register sharing between different vim clients, but how do you achieve the same thing in neovim? It doesn't support the client/server flags. I ...
3
votes
1answer
286 views

Externally query a vim server to list the open buffers in it

I'm on linux and I'm querying the list of files open in a gvim server so I can pull it up with gvim --servername <name> --remote <file> To do so, I wrote a helper function that returns ...
23
votes
5answers
8k views

What are practical uses of the client-server mode?

I know that Vim allows a client server mode (:h clientserver): it is possible to turn it into a server which will get some commands and execute them and as a client which will send the commands to the ...
9
votes
2answers
235 views

Share completions between running vim instances

I use tmux for the most part instead of using vim tabs and splits. Does vim have the ability to share completions (via Ctrln and Ctrlp) between running instances? Is there a way to set it up where ...
2
votes
0answers
666 views

Start server from within existing Vim instance

Is it possible to have an existing vim instance launch a server from within, without using the --servername command-line option? (I would want to do this from a FileType autocommand). Alternatively, ...
3
votes
1answer
55 views

Discard command-line contents when receiving remote keys

If Vim command-line is being edited and the Vim instance receives a string due to vim --remote-send KEYS executed on a shell somewhere, result is somewhat equivalent to pressing Return in the command-...
4
votes
1answer
2k views

How to redirect the output of a command as the quickfix list to a vim server / function?

When I click on a link in thunderbird and firefox is already running, it doesn't open a new window, just a new tab. I want the same thing for vim: no matter where I am and how I send a bunch of files ...
14
votes
3answers
4k views

How can I use --servername and --remote in neovim?

in vim I can do vim --servername foo and vim --servername foo --remote-silent bar.txt to open files in one instance of vim from several terminal windows (via tmux or whatever). How is the same thing ...
3
votes
3answers
293 views

Exit when only one empty window remains

I'm using a script to load files in vim remotely into one gvim instance per desktop viewport. It works fine, except that it causes an empty additional window, that will remain after closing all others,...
1
vote
1answer
179 views

How do you open a session in an existing server?

I'm using the server mode in vim and already have an instance open with a couple of files in. I'd like to add the contents of a session file to this. However doing vim --servername vim -S ...
5
votes
1answer
183 views

Different autocmd behavior when using --remote-tab-silent?

This question is a follow-up to Switching to the local directory after loading a file? I have the following in my .vimrc: autocmd BufReadPost *.tex lchdir %:p:h with the intent of setting the ...
20
votes
2answers
2k views

Can I open a file in an existing Vim instance from an external command?

Some applications have the notion of a "session", where you can run a command to load a file in an existing instance of an application. For example, when I type: $ firefox http://vi.stackexchange....
11
votes
2answers
218 views

Is it possible to use vim's clientserver functionality to keep settings synchronized?

I usually have multiple instances of vim running on the same machine. When I make a change to my vimrc I can just :source ~/.vimrc (with an easy mapping or an autocmd). But in order to have all ...