Arch-Linux

如何在 Arch linux 上使用 +clientserver 編譯 vim?

  • June 20, 2020

我正在嘗試使用 vim 用 vimtex 編輯 TeX 文件。我希望能夠從已編譯的 PDF 中進行向後搜尋。vimtex文件說明如下:

|+客戶端伺服器| 從 PDF 查看器到 Vim 的向後搜尋是必需的。

然後它建議點擊此連結以確保 vim 以伺服器名啟動。我按照說明+clientserver通過執行來檢查我是否有,$ vim -h | grep servername但我沒有得到輸出(表明我沒有它)。我也跑了$ vim --version | grep client,我得到了-clientserver. 然後該頁面提供以下選項:

  1. 將 vim 符號連結到 gvim(如果您安裝了 gvim)。
  2. 從二進製文件安裝帶有’clientserver’支持的vim
  3. 從具有客戶端伺服器支持的原始碼建構 vim 並安裝它

我不想使用 gvim,所以我僅限於選項 2 和 3。但是,我找不到任何關於如何在 arch 上執行此操作的方向,如果有人知道該怎麼做,我將不勝感激。

Arch Linux 上的gvim軟體包提供了帶有客戶端伺服器功能的 vim 二進製文件:

↪ 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>

客戶端伺服器功能也適用於基於軟體包的vim終端gvim

引用自:https://unix.stackexchange.com/questions/594076