2

I am trying to use vim to edit TeX files with vimtex. I would like to be able to do backwards search from compiled PDFs. The vimtex documentation says the following:

|+clientserver| is necessary for backward search from PDF viewer to Vim.

It then suggests following this link to ensure that vim is started with a servername. I follow the instructions to check if I have +clientserver by executing $ vim -h | grep servername but I get no output (indicating that I don't have it). I also ran $ vim --version | grep client and I get output of -clientserver. The page then provides the following options:

  1. symlink vim to gvim (if you have gvim installed).
  2. install vim with 'clientserver' support from binaries
  3. build vim from sources with clientserver support and install it

I don't want to use gvim, so I am limited to options 2 and 3. However, I could not find any direction on how to do this on arch and I would appreciate if anyone knew how to do so.

2
  • It really seems to me that, unfortunately, to enable +clientserver you also need to check in some sort of graphical Vim. I've grepped in the whole source tree and checked ./configure --help, but did not find anything on enabling +clientserver that wouldn't also include some sort of gvim. Should be worth an issue on their Github. Commented Jun 20, 2020 at 22:19
  • Thanks for your research. I will try opening an issue. Commented Jun 21, 2020 at 1:14

1 Answer 1

0

The gvim package on Arch Linux provides a vim binary with the clientserver feature:

↪ vim --version | grep client
-clientserver      +job               +persistent_undo   -toolbar
↪ pacman -Qo /usr/bin/vim
/usr/bin/vim is owned by vim 8.2.0814-2
↪ sudo pacman -S gvim                                     
resolving dependencies...
looking for conflicting packages...
:: gvim and vim are in conflict (vim-minimal). Remove vim? [y/N] y

Package (2)  Old Version  New Version  Net Change

vim          8.2.0814-2                 -3.60 MiB
extra/gvim                8.2.0814-2     3.92 MiB

Total Installed Size:  3.92 MiB
Net Upgrade Size:      0.32 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                        [-------------------------------------------------] 100%
(1/1) checking package integrity                                                      [-------------------------------------------------] 100%
(1/1) loading package files                                                           [-------------------------------------------------] 100%
(1/1) checking for file conflicts                                                     [-------------------------------------------------] 100%
(2/2) checking available disk space                                                   [-------------------------------------------------] 100%
:: Processing package changes...
(1/1) removing vim                                                                    [-------------------------------------------------] 100%
(1/1) installing gvim                                                                 [-------------------------------------------------] 100%
Optional dependencies for gvim
    python2: Python 2 language support [installed]
    python: Python 3 language support [installed]
    ruby: Ruby language support
    lua: Lua language support [installed]
    perl: Perl language support [installed]
    tcl: Tcl language support [installed]
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating icon theme caches...
(3/3) Updating the desktop file MIME type cache...
↪ pacman -Qo /usr/bin/vim
/usr/bin/vim is owned by gvim 8.2.0814-2
↪ vim --version | grep client
+clientserver      +job               +persistent_undo   +toolbar
↪ vim --help | grep servername
   --servername <name>  Send to/become the Vim server <name>

The clientserver feature also works in the terminal based vim in the gvim package.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.