DervishD wrote:
    Hi Tony :)

 * A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
[...]
As long as your vimrc includes only 7-bit ASCII, there's no problem. But in the particular case of your vimrc, you could add the following lines at top, do ":setlocal fenc=latin1", and (IIUC) it will always be _read_ as Latin1 in the future, because of the accented letters in your name:

    Won't "scriptencoding" work? I have latin1 characters in my vimrc
and setting "encoding=utf8" now causes vim to spill an error when
reading it :((( I'm afraid I will have to keep it at the default value.

    Thanks for all the help :)

    Raúl Núñez de Arenas Coronado


Maybe I didn't express myself clearly enough. Unless your vimrc includes codepoints higher than U+00FF, it can be represented in Latin1. Any Latin1 file which includes the words "Raúl Núñez" will cause the UTF-8 heuristic to fail in 'fileencodings', and Vim will see it as Latin1.

":scriptencoding" is used to tell Vim's sourcing engine in which 'fileencoding' the script was written. There are two cases where it is not necessary:
- the same as 'encoding', or
- UTF-8 with BOM.
IOW, yes, if you set 'encoding' to UTF-8 you may have to also issue ":scriptencoding latin1". Or else you can use a UTF-8 vimrc, provided that you can be sure that it will never be sourced (or that characters >0x7F in it will always be skipped) in a Vim compiled with -multi_byte.

Best regards,
Tony.

Reply via email to