Hi Fan,

On Jan 21, 2008 1:30 PM, Fan Decheng <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> Now every write to the file is OK.  However after exiting gvim, the
> swap
> file is still there.

Although your solution seems to solve part of your problem, but I
still want to admit that modifying the "encoding" during runtime is
really harmful for your health.  So never do that unless your are an
expert.  If you want to change the value of "encoding", please modify
your ".vimrc" and restart your (g)vim.  You should never modify the
encoding when (g)vim is already running.

Any way, if all the characters in your file can be covered by GBK,
it's also OK for you to use GBK as your internal encoding.  To create
a UTF-8 file:

:set fenc=utf-8
:w filename

To load a UTF-8 file:

:e ++enc=utf-8 filename

But personally I still prefer using UTF-8 in Vim.

> Sorry for writing this long, just for some reference.  I've read the
> help
> for `fencs', but I did't find it helpful to this situation.

"fencs" has nothing to do with your original question.  Any way, I
referred that to you just because I think you'll need it if you want
your UTF-8 file to be recognized automatically rather than setting
"++enc" manually every time.  You may also have a try on the plugin
named "fencview", developed by Ming Bai and Wuyong Wei.

>
>
>
> >
>

Regards,


L. F.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui