On 6/13/06, A.J.Mechelynck wrote:
Mojca Miklavec wrote:
> On 6/12/06, A.J.Mechelynck wrote:
>
>> You must make sure that you have:
>> - an 'encoding' which includes the non-Latin characters you want to use
>> - (in console Vim) a terminal code page which includes them
>
> What is that? And "console vim" if you mean the one without GUI menus
> is not always there (I have it one one computer, but not on the
> other).

"Console Vim" is the one without GUI. On Windows a different executable
must be used, usually named vim.exe (or possibly something starting in
"vim" as in vimd.exe for a debug version etc.); it displays in a Dos
Box. On Unix a single executable can be used as a GUI (through X11) or
as a console version (displaying on /dev/tty or on xterm, konsole, etc.)
depending on how it is invoked.

OK, when I installed the new vim 7, it's there. It wasn't present in
the old 6.4 version, but that's not really important: I (would/will)
never use it anyway.

'guifont' empty means some default system font, such as Fixed. IMHO it
is not he prettiest but if you're satisfied with it you may stay with it.

I don't say that it's the prettiest, but I tried to search for some
better fonts using some suggestions in "vim recipes". The problem is
that most fonts mentioned don't support Central European characters.
(And some fonts that I have need to big sizes to be readable. Lucida
Consile is the only other acceptable font that I know/have.) I would
really like to use something else, but I didn't find anything more
suitable yet.

There is a -menufont {font} command-line option, but from where it is
described in the help I fear it is only applicable to X11 (all
Unix/Linux versions and possibly some MacOsX versions). AFAIK the font
used for menus in Windows is common to all applications and thus outside
the reach of gvim. Try the following:

gvim -N -u NONE
:language messages
:set encoding?

Great! Thanks a lot. That did it! [grrr ... I'm so stupid that I
didn't try to remove my _vimrc file before]

I get:

Current messages language: "SL"
encoding=cp1250

The problem was that I had the following two lines in _vimrc:

  set encoding=utf-8 termencoding=cp1250
  set fileencodings=ucs-bom,utf-8,cp1250

I don't know how exactly each one influences the behaviour (the second
line was suggested to me on this mailing list some time ago), but I
had to comment out the first one and the problem has gone. I had
numerous problems with utf-8 before adding those lines. For some
strange reason Windows doesn't recognize vim as "being able to do
Unicode", so it communicates in an old cp1250 fashion with it. cp1250
is indeed set in the regional settings, but I didn't manage to explain
to Windows that vim can handle utf-8 as well.

OK, I only left
  set fileencodings=ucs-bom,utf-8,cp1250
in my _vimrc and the menues seem to be OK now.

But now my second question: if I open some utf-8 file, it opens as
utf-8, which is OK. But when I open a new file and save it, it's saved
in cp1250 unless I type :set encoding=utf-8 before. So, after saying
"set encoding=utf-8" the menu stays OK, but if I put that into my
_vimrc, the encoding in menu is "broken". Any remedy for it?

Thanks a lot,
  Mojca Miklavec

Reply via email to