Frage

I've installed and tested some statuslines (VIM Airline - VIM Lightline, etc) with some plugins (VIM Fugitive, VIM NERDtree, etc...), everythings works... except for the fonts.

I work from my Mac OSX to a Linux server where i connect via ssh.

I have not yet understood:

  1. Where do I install the fonts? On my Mac or on my Linux Server? I have already installed the font on my Mac and i have already set "guifont" in my vimrc file on my Linux server with no success.

  2. How to install a patched font? The guides that I've found online do not resolve this issue.

I just want to see the special characters while working with Vim on my Linux server.

War es hilfreich?

Lösung

When you connect via SSH from Mac OS to Linux, Vim runs on the Linux system, but you're interacting with it through the terminal emulator program on Mac OS. The SSH protocol (as the older telnet) is based on just exchanging pressed keys and printed output (which includes special control sequences to reposition the cursor, change colors and text attributes, but not font changes - there's only a single default font involved).

As you're running terminal Vim, not the graphical GVIM, the 'guifont' option doesn't apply here. Instead, you need to configure the font in the Mac OS terminal emulator program (and that will then apply not only to Vim, but to any SSH connection to any remote computer).

Alternative

Linux systems use the X protocol for graphical programs. As this program is remotable, you can forward the user interface to another system, e.g. with ssh -X <hostname>. This requires a running X environment on your (Mac OS) client. As the X protocol exchanges keypresses, mouse events, and graphical updates (like the Remote Desktop for Windows), here, the font settings are entirely determined by the Linux system, and 'guifont' applies.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top