How to view UTF-8 Characters in VIM or Gvim

前端 未结 9 1133
天命终不由人
天命终不由人 2020-12-12 11:01

I work on webpages involving Non-English scripts from time to time, most of them uses utf-8 charset, VIM and Gvim does not display UTF-8 Characters correctly.

Using

9条回答
  •  伪装坚强ぢ
    2020-12-12 11:34

    On Microsoft Windows, gvim wouldn't allow you to select non-monospaced fonts. Unfortunately Latha is a non-monospaced font.

    There is a hack way to make it happen: Using FontForge (you can download Windows binary from http://www.geocities.jp/meir000/fontforge/) to edit the Latha.ttf and mark it as a monospaced font. Doing like this:

    1. Load fontforge, select latha.ttf.
    2. Menu: Element -> Font Info
    3. Select "OS/2" from left-hand list on Font Info dialog
    4. Select "Panose" tab
    5. Set Proportion = Monospaced
    6. Save new TTF version of this font, try it out!

    Good luck!

提交回复
热议问题