How to use Unicode characters in a vim script?

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-05-10T18:34:49Z Indexed on 2010/05/10 18:54 UTC
Read the original article Hit count: 374

Filed under:
|
|

I'm trying to get vim to display my tabs as ? so they cannot be mistaken for actual characters. I'd hoped the following would work:

if has("multi_byte")
    set lcs=tab:? 
else
    set lcs=tab:>-
endif

However, this gives me

E474: Invalid argument: lcs=tab:?

The file is UTF-8 encoded and includes a BOM.

Googling "vim encoding" or similar gives me many results about the encoding of edited files, but nothing about the encoding of executed scripts. How to get this character into my .vimrc so that it is properly displayed?

© Stack Overflow or respective owner

Related posts about vim

Related posts about unicode