Hi Yongwei :)

 * Yongwei Wu <[EMAIL PROTECTED]> dixit:
> > * Yongwei Wu <[EMAIL PROTECTED]> dixit:
> >> On 1/18/07, DervishD <[EMAIL PROTECTED]> wrote:
> >> >> Did you set 'fileencodings' to an empty string?  Otherwise this would
> >> >> not work.
> >> >
> >> >    Apart from fixing the above (including the last version I posted
> >> >here, which has a catch, yes, I have "fileencodings" set to an empty
> >> >string. Why this wouldn't work if 'fencs' is not an empty string? Is
> >> >because 'fenc' will get a value *after* the autocommand is invoked?.
> >>
> >> 'Fileencodings' is the option to detect the file encoding, and
> >> 'fileencoding' is the option to set/reflect the encoding of the
> >> current file.
> >>
> >> In my _vimrc, I have settings like:
> >[...]
> >>  au BufReadPre  *.gb               call SetFileEncodings('cp936')
> >>  au BufReadPre  *.big5             call SetFileEncodings('cp950')
> >>  au BufReadPre  *.nfo              call SetFileEncodings('cp437')
> >>  au BufReadPost *.gb,*.big5,*.nfo  call RestoreFileEncodings()
> >>
> >> You may use a similar way.
> >
> >    Yes, but that won't solve my problem, because I cannot filter by
> >name. Anyway, setting fileencodings instead of fileencoding looks like
> >an interesting approach. Which advantages does it have (vs. changing
> >"fenc" instead)?
> 
> If you ever set fencs, setting fenc before loading a file does not
> work at all.

    Just what I was afraid of :( Really your method is better, and I'm
going to ste^H^H^Huse it as inspiration ;)))

    Thanks a lot for your advice :)

> My personal setting of fileencoding is quite complicated. Though my
> _vimrc cannot do what you described, it allows me to automatically
> detect file encodings utf8, gbk, big5, and latin1. See my home page
> below if you are interested.

    I'm interested and I'll take a look at your home page right now.
Thanks a lot :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

Reply via email to