Questions tagged [clientserver]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
82 views

Unable to connect to a client server

Description Vim does not connect to a clientserver, which causes issues using VimTex and zathura. Upon opening any file in an Ubuntu terminal, the following error is displayed: Error detected while ...
James Pagan's user avatar
1 vote
1 answer
125 views

Modify syntax highlighting dynamically

Is it possible to write a vim plugin that modifies buffer in real time? As a first step, would it for example be possible to modify syntax highlighting of unused variables as suggested in a similar ...
ffigari's user avatar
  • 137
0 votes
0 answers
44 views

Invoking vim from another program to edit and return text

Is it possible to invoke vim from another program to edit a block of text passed from that program and have vim return the edited text to the invoking program without writing it to a file? I am ...
RedGrittyBrick's user avatar
1 vote
1 answer
794 views

Launching vim with a servername

I am trying to use reverse searching from PDF documents to their respective *.tex files. I use vim (in terminal) as my editor and my PDF viewer is Zathura. Forward searching works however the problem ...
Zeta-Squared's user avatar
2 votes
2 answers
1k views

How to install vim with +clientserver on debian?

I would like to enable Vim's clientserver support for the vimtex call back mechanism. "Vim requires |+clientserver| in order to allow inverse search from the PDF viewer to Vim (see |vimtex-...
Paul Rougieux's user avatar
1 vote
1 answer
156 views

how to remotely focus Vim through the clientserver

I use Linux and usually run Vim in a terminal. Lately, I've been using Vim's clientserver functionality to interact with Vim remotely. I'm wondering if there's a way to focus the terminal/Vim window ...
Trevor's user avatar
  • 467
1 vote
1 answer
264 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 ...
Muricula's user avatar
  • 121
1 vote
1 answer
138 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: ...
Rich's user avatar
  • 30.9k
1 vote
1 answer
141 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 ...
hyperpallium's user avatar
0 votes
2 answers
606 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. ...
mbilyanov's user avatar
  • 697
2 votes
1 answer
51 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 ...
Sean Mackesey's user avatar
1 vote
0 answers
289 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 ...
Pedro L Vera's user avatar
3 votes
2 answers
2k 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 ...
B. Mehta's user avatar
  • 201
0 votes
1 answer
333 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 ...
gospes's user avatar
  • 133
1 vote
0 answers
77 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), ...
Mu Mind's user avatar
  • 485
0 votes
1 answer
57 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 ...
Sathyam's user avatar
  • 198
12 votes
4 answers
3k 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 ...
Christopher Waldon's user avatar
3 votes
1 answer
492 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 ...
user128063's user avatar
27 votes
6 answers
15k 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 ...
statox's user avatar
  • 49k
10 votes
2 answers
349 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 ...
Greg Nisbet's user avatar
  • 1,785
2 votes
0 answers
1k 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, ...
Circonflexe's user avatar
3 votes
1 answer
64 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-...
meekreau's user avatar
6 votes
1 answer
5k 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 ...
saginaw's user avatar
  • 6,666
24 votes
5 answers
13k 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 ...
Rafael Vega's user avatar
3 votes
3 answers
393 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,...
Volker Siegel's user avatar
1 vote
1 answer
237 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 ...
JonnyRaa's user avatar
  • 1,181
5 votes
1 answer
271 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 ...
Rmano's user avatar
  • 748
29 votes
3 answers
6k 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....
ideasman42's user avatar
  • 3,673
11 votes
2 answers
437 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 ...
xthrd's user avatar
  • 5,140