Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [clientserver]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 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 ...
user avatar
  • 137
0 votes
0 answers
24 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 ...
user avatar
1 vote
1 answer
209 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 ...
user avatar
1 vote
1 answer
714 views

How to install vim with +clientserver on debian?

I would like to enable Vim's clientserver support for the vimtex call back mechanism. If possible only installing apt packages, I installed the following: sudo apt install vim sudo apt install vim-...
user avatar
1 vote
1 answer
112 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 ...
user avatar
  • 447
1 vote
1 answer
198 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 ...
user avatar
  • 121
1 vote
1 answer
114 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: ...
user avatar
  • 27.4k
1 vote
1 answer
123 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 ...
user avatar
0 votes
2 answers
569 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. ...
user avatar
  • 667
2 votes
1 answer
42 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 ...
user avatar
1 vote
0 answers
224 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 ...
user avatar
2 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 ...
user avatar
  • 191
0 votes
1 answer
293 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 ...
user avatar
  • 133
1 vote
0 answers
73 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), ...
user avatar
  • 475
0 votes
1 answer
50 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 ...
user avatar
  • 198
11 votes
4 answers
2k 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 ...
user avatar
3 votes
1 answer
421 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 ...
user avatar
26 votes
5 answers
14k 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 ...
user avatar
  • 45.9k
10 votes
2 answers
317 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 ...
user avatar
  • 1,643
2 votes
0 answers
944 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, ...
user avatar
3 votes
1 answer
63 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-...
user avatar
5 votes
1 answer
4k 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 ...
user avatar
  • 6,416
19 votes
4 answers
10k 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 ...
user avatar
3 votes
3 answers
377 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,...
user avatar
1 vote
1 answer
213 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 ...
user avatar
  • 1,121
5 votes
1 answer
253 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 ...
user avatar
  • 728
28 votes
3 answers
5k 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....
user avatar
  • 3,383
11 votes
2 answers
384 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 ...
user avatar
  • 4,630