Monday, October 25, 2010

Re: enc,fenc (again!?)

> You should have written a script that shows your problem and uses `-u NONE'. I
> managed to reproduce this behavior with the following script:
>    touch a
>    touch b
>    vim -u NONE -c 'set nohidden' \
>                -c 'e a' \
>                -c 'echo &fenc' \
>                -c 'e ++enc=latin1 b' \
>                -c 'echo &fenc' \
>                -c 'bn' \
>                -c 'bn' \
>                -c 'echo &fenc' \
>                -c 'qa!'
> Output:
>    "a" строк: 0, символов: 0
>    utf-8
>    "b" [перекодировано] строк: 0, символов: 0
>    latin1
>    "a" строк: 0, символов: 0
>    "b" строк: 0, символов: 0
>    utf-8
> vim-7.3 from Gentoo repos. I do not know, whether this is intended behavior when
> buffer is abandoned, but this does not happen if you add `set hidden' somewhere
> into .vimrc.

Hi, ZyX.

Thank for your reply.

Well, I read the help about 'hidden' and what you said makes a lot of sense.
Since my 'hidden' option is 'off' the buffers are unloaded and their
respective internal variables are also unloaded.

I don't have 'nohidden' in my .vimrc. I partially solve the problem with a
modeline. But I know that this is not a real solution since the modeline is
only read after the buffer is already loaded, which could be done in a wrong
character set. For now I am only mixing utf-8 with latin1 in Portuguese
language which does not have much issues. I will try the 'nohidden' setting.

Thanks again.

Alessandro Antonello

--
You received this message from the "vim_use" 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

No comments:

Post a Comment