On Tuesday, April 1, 2014 6:59:52 PM UTC-5, [email protected] wrote:
> > > An alternative to ZyX's suggestion of using the "scriptencoding" command
> > > to tell Vim what encoding to read the vimrc in, you could also use the
> > > codepoint value in a string to set the listchars:
> >
> > let &listchars="eol:\u00B6"
>
> This works, but only for the first setting. I tried a few permutations using
> the '.' concatenation operator, but couldn't get it right. What's the
> correct syntax?
You can do the same thing to the rest of the special characters in the string.
You said you wanted this string:
eol:¶,tab:\|,trail:•,extends:»,precedes:«,nbsp:×
So you could use:
let
&listchars="eol:\u00b6,tab:|,trail:\u2022,extends:\u00bb,precedes:\u00ab,nbsp:\u00d7"
There I replaced each special character with the corresponding codepoint and
your .vimrc can actually be encoded in Latin1 or some similar default encoding
if needed.
Side note, to generate this I took your desired string, added a trailing comma
to simplify the regex, and did this:
:s#:\(.\),#\=':\u'.printf('%04x', char2nr(submatch(1))).','#g
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.