Skip to main content
25 votes

What are practical uses of the client-server mode?

Before the channel/job recent feature of Vim 7.4, the client-server feature was the only way to do a decent background compilation -- without any dependency to Python. We start compilation as a ...
Luc Hermitte's user avatar
  • 17.5k
18 votes

What are practical uses of the client-server mode?

My use of this is a little more simplistic (and perhaps commonplace) than Luc Hermitte's. If you start an instance of gvim with this compiled in (and it is, and has been for a long time, on, e.g., ...
goldilocks's user avatar
15 votes
Accepted

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

Neovim remote is a python script for controlling neovim processes. It has the vim style --servername and --remote options. This is what I use now for my multiple-terminal work environment.
Rafael Vega's user avatar
10 votes

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

As mentioned, all of the clientserver features were removed in Neovim. This is because they use the X11 shared memory and Neovim removed X11 support. However, if I use :help --servername in Neovim I ...
Martin Tournoij's user avatar
8 votes

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

While @craigp's answer is correct, I found it most convenient to simply add --remote-silent without worrying about server names,(this assumes you don't want to address named vim instances). This will ...
ideasman42's user avatar
  • 3,763
7 votes

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

No idea about the clientserver feature, the simplest way I can think of would be to use the system clipboard by default when yanking or pasting which can be done with: set clipboard=unnamedplus ...
LEI's user avatar
  • 1,636
6 votes
Accepted

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

LEI is right; and the neovim help instructions give this as a specific use case for that feature: Two commands can be used to read and write the ShaDa file manually. This can be used to exchange ...
kdannyob's user avatar
5 votes

What are practical uses of the client-server mode?

Embedded development. A lot of times in embedded development you have a IP socket, but limited local hard drive space, or no non-volatile memory, or any number of other things. You can start a server ...
Sam's user avatar
  • 151
5 votes
Accepted

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

In any context where a "keycode" is expected, use <lt> to represent a literal <. vim --remote-send "<lt>C-t>" See also :help keycodes.
Justin M. Keyes's user avatar
4 votes

Vim not starting server

I had exactly the same problem when trying to get vimtex working with Skim. That is, I had vim 8 installed with --with-client-server (showing as +clientserver) and XQuartz running but --servername ...
lemonad's user avatar
  • 141
4 votes

How to install vim with +clientserver on debian?

As explained in this 2004 bug report: sudo apt install vim-gtk Adds +clientserver support to vim.
Paul Rougieux's user avatar
3 votes

What are practical uses of the client-server mode?

I wrote my masters thesis using Vim, LaTeX and BibTeX. To manage my BibTeX references, I used a program called JabRef. JabRef has a neat little feature where you can connect it to a Vim server ...
phantom-99w's user avatar
3 votes

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

An update to the answers. Neovim now supports some limited use of --remote and friends. I think more will be coming in the future. See https://neovim.io/doc/user/remote.html
Fillipos Christou's user avatar
2 votes
Accepted

Share completions between running vim instances

Vim is able to use the same completion database if the database is external to each vim instance. For example, completion will be somewhat 'shared' if you use ctags completion or youcompleteme or any ...
Yury Ershov's user avatar
2 votes

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

For Windows I propose the following solution: Add the following line to you ginit.vim file: silent execute "!echo " . v:servername . " > servername.txt" Remark: The ginit.vim file is to be found ...
Vivian De Smedt's user avatar
2 votes

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

In addition to @craigp's answer, you can also open a file in a remote tab. vim --servername SERVER --remote-tab FILE
Tyhou's user avatar
  • 121
2 votes

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

You could use your own code to list the buffers, instead of execute "silent buffers": for i in range(1, bufnr('$')) if buflisted(i) echo i . ' ' . fnamemodify(bufname(i), ':p') endif endfor ...
joeytwiddle's user avatar
  • 3,652
2 votes

What are practical uses of the client-server mode?

My workflow is similar to what goldilocks said in his answer. I use vim8's :terminal feature in combination with --remote option. I maintain 2 window layout in vim. Code in left window and terminal on ...
SantoshSrinivas's user avatar
2 votes
Accepted

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

What you are looking for has nothing to do with Vim or any editor you are using, you want a tool like grunt.js. Grunt is a task runner that you can configure to do a lot of things automatically, ...
statox's user avatar
  • 50.1k
2 votes
Accepted

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

I haven't looked deeply into it, but reading :help --remote, it mentions this about +{cmd}: This must be an Ex command that can be followed by "|". Your :normal interprets the remainder as normal ...
Ingo Karkat's user avatar
  • 17.9k
2 votes

How to install vim with +clientserver on debian?

I stumbled on this old thread and was not satisfied with the information provided so far, so I did a bit more research and posted a question on the Vim maintainer list for Debian. They were kind ...
18grady's user avatar
  • 21
2 votes
Accepted

Modify syntax highlighting dynamically

As far as I know :h text-properties were designed with this in mind. The main use for text properties is to highlight text. This can be seen as a replacement for syntax highlighting. Instead of ...
Maxim Kim's user avatar
  • 13.6k
1 vote
Accepted

Launching vim with a servername

If that needs to be done before vim is started what about using a bash alias? In your ~/.bash_alias file (or ~/.bashrc or ~/.zshrc) you could add the following: alias vimsn='vim-with-servername' vim-...
statox's user avatar
  • 50.1k
1 vote

how to remotely focus Vim through the clientserver

I don't believe this is possible, other than by the methods you have already suggested. I don't think Vim knows whether or not the terminal it is in has focus, and it definitely has no method of ...
Rich's user avatar
  • 32.2k
1 vote
Accepted

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

I tweaked an example which Ralf mentioned in the comments to get this: gvim --server=$SERVER --remote-send ":execute('tab tag $tag')<CR>" Remote send sends the following commands to the gvim ...
Muricula's user avatar
  • 121
1 vote

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

Hack-of-concept: :autocmd CursorMoved * silent exe '!tmux send-keys Escape :' line("w0")-16: 'Enter' 'z Enter' hook into CursorMoved events (vim lacks scroll events; we could map explicit ...
hyperpallium's user avatar
1 vote

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

Atom is the only editor I know of that has that capability built-in. You'll need to bring in third party tools. I did some research on a related topic some time back as I was looking for real-time ...
B Layer's user avatar
  • 20k
1 vote

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

use tmux´╝îtmux buffer to unname register, uname register to tmux buffer https://github.com/tracyone/t-vim/blob/master/autoload/te/tmux.vim
tracyone's user avatar
  • 345
1 vote

Vim not starting server

clientserver needs X11 for working. So on OSX, you have to run XQuartz. Also, be sure that your vim is not a symlink to mvim with the -v option (mvim -v would run vim in terminal mode without X11 ...
Ruby's user avatar
  • 11
1 vote
Accepted

Vim's remote-send, without intermediate redraws?

one workaround is to write an tempfile with the command(s) in them. Then send a command to source this file. like in > vim --server "<servername>" --remote-send "so /path/to/tempfile"
Naumann's user avatar
  • 2,759

Only top scored, non community-wiki answers of a minimum length are eligible