11

How to get GVim (v. 7.3. on Windows XP, if that matters) to show Unicode characters? Something along the lines of

http://vimcasts.org/episodes/show-invisibles/ (search for listchars to see the little triangle I'm trying to get).

I'm using

set encoding,
set fileencoding,
and set fileencodings,

all to utf-8, if that helps.

I know it must be something simple, but nevertheless, here I am, stuck. Help.

3 Answers 3

6

After turning on Unicode display in Vim with

:set encoding=utf-8

you may need to reload the file for it to take effect. Do :e! to reload the file. If it works, you may want to put set encoding=utf-8 in your vimrc file.

5

Is your current font capable of displaying all the characters you're using? If not, then you need to change the font used by GVim. Check out this thread at SO. Excerpt:

For MS-Windows, some fonts have a limited number of Unicode characters. Try using the "Courier New" font. You can use the Edit/Select Font... menu to select and try out the fonts available. Only fixed-width fonts can be used though. Example:

:set guifont=courier_new:h12
3
  • 2
    I've tried Cou.New, Courier, Consolas, Lucida Console, ... all I get is a little square box with a question mark.
    – Rook
    Oct 19, 2010 at 17:35
  • @RookL for which characters? (you can press ga over a character to find its unicode value. It is possible that the font does not have that character.
    – Aditya
    Jan 30, 2011 at 2:02
  • :set guifontwide=MingLiU:h10 (from stackoverflow.com/a/14613767/239408) is working for me
    – xverges
    Nov 18, 2013 at 16:10
1

Try to change encoding with:

:set encoding=utf-8
1
  • Read the question again.
    – Rook
    Oct 9, 2011 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .