On 07/06/10 14:30, Pablo Giménez wrote:
I will double check this for the terminal.
But this problem is happening when launching gvim from the gnome menu,
so no terminal is involved here.
Also I am wondering if I am goingto have similar problems in Mac or
Windows.
Seems that using UTF-8 is not the most portable option.
As a workaround I can limit utf-8 encoding just for text files. Any othe
rtext is going to be code so I think latin1 is more than enough.
Thanks
In order to type UTF-8 text, you need 'encoding' set to UTF-8, otherwise
Vim won't be able to represent the data in memory; however, since
'encoding' is a global option, and _already_ loaded text is not
converted, you should make sure that there is no data already loaded in
Vim (except possibly 7-bit ASCII) at the time you make the change. This
applies to file text and also to mappings, options, etc.
It may make a difference whether your mapping is defined in your vimrc
before or after you switch Vim to UTF-8: have you tried moving the code
around?
Another possibility is to use a gvim version compiled with GTK2 GUI
(with or without the Gnome features compiled-in), because (when in GUI
mode) it _always_ reads your keyboard in UTF-8, and it also sets
'encoding' to UTF-8 by default (which I would say is the "native" GTK2
encoding). Note, however, that the 'guifont' option has a different
format for GTK2 than for all other gvim versions (see ":help
setting-guifont").
Every OS has its own quirks. I started using Unicode when still on
Windows, and (after junking the Borland compiler in favour of Cygwin
gcc) it worked. When I came over to Linux, it worked in approximately
the same way, maybe a little more easily because here on openSUSE my
"system" locale is en_US.UTF-8, unlike Windows where it used to be
something called "French_Belgium.1252".
Best regards,
Tony.
--
"There is hopeful symbolism in the fact that flags do not wave in a
vacuum."
-- Arthur C. Clarke
--
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