DervishD wrote:

>     After that, I've set up this mappings to switch manually from one
> encoding to other:
> 
>  noremap  <silent> <Leader>+ :setlocal fenc=utf8 enc=utf8<CR>
>  noremap  <silent> <Leader>- :setlocal fenc=latin1 enc=latin1<CR>
> 
>     OK, this is not a perfect solution, and it's a bit crappy and can be
> automated (for example, using "file -i") but it works for me and I find
> it very comfortable to use.

Keep in mind that when you change 'encoding' in a running Vim then all
text in loaded buffers, registers, variables, etc. will become invalid.
It's better to only set 'encoding' when starting up and then leave it
alone.

-- 
I am also told that there is a logical proof out there somewhere
that demonstrates that there is no task which duct tape cannot handle.
                                        -- Paul Brannan

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to