7

I installed ttf-font-awesome in Arch Linux; if I open up a file which contains icons from Font awesome it recognizes the file as utf-8 but the icons are displayed as squares. Does anyone know how to fix this?

9

First off, Vim can only display a file in a single font, you can't use multiple fonts at the same time.

For gVim, you can use guifont to set this to Font Awesome:

set guifont=Font\ Awesome\ 14

Which seems to work fine.

For Terminal Vim, you will need to configure your terminal emulator to use Font Awesome.

For xterm, this doesn't seem to work, for gnome-terminal, it does... Other terminal emulators may or may not work...

  • Vim (as opposed to gVim) will use the terminal emulator’s font handling, so depending on your terminal emulator, you might be able to use multiple fonts at the same time. For example. urxvt (a.k.a. rxvt-unicode) does allow configuring a comma-separated list of fonts, but that is outside the scope of Vi/Vim (or, I have discovered a truly marvelous configuration of this, which this comment box is too narrow to contain :) ). – Lithis Oct 18 '16 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.