On 15/01/09 12:16, Axel Palm wrote:
> Vim newbie question:
> how can i make my national characters to become characters in vim's
> sense?
> I have issues with "öäüõžš".
> I have in my _gvim (what I think is relevant) :
> set enc=Latin1
> set isk=@,48-57,_,128-167,196,213,214,220,224-235,245,246,252
>
> Any help is very appreciated.
>
> Axel
Here is what your settings mean for Latin1 (ISO-9959-1) (see ":help
'iskeyword', which resends to 'isfname'):
@ the letters (normally [A-Za-z] plus accented characters; it may depend
on your locale and/or on your compiler
48-57 the digits
_ underscore
128-167 32 unprintable control characters, plus no-break space, inverted
exclamation mark, US cent, pound sterling, general currency sign, yen,
broken bar and paragraph sign
196 capital A with umlaut
213 capital O with tilde
214 capital O with umlaut
220 capital U with umlaut
224-235 the following:
small a with grave accent
small a with acute accent
small a with circumflex
small a with tilde
small a with umlaut
small a with ball
small ligature a e
small c with cedilla
small e with grave accent
small e with acute accent
small e with circumflex
small e with diaeresis
245 small o with tilde
246 small o with umlaut
252 small u with umlaut
Here are my remarks:
- A file named _gvim is not sourced by Vim at any point. These settings
ought to be in your _vimrc, which is sourced by both Console Vim and gvim.
- 128-167 are not keyword characters for Latin1, they make me suspect
that you're "lying" to Vim, telling it that your encoding is Latin1 when
actually it is Windows-1252 (which has printable characters in the range
128-159).
- s and z with caron are not included because they have no
representation in Latin1 (Latin1 is a "Western" encoding which lacks
some "Western" characters like the French small o e and capital O E
ligatures, the capital Y with diaeresis, the Euro sign, etc. It contains
none of the accented letters specific to Czech, Slovak, Slovene,
Croatian, Rumanian, Hungarian and Polish ("Central European" languages).
- You might want to set up Vim to use Unicode, by adding the following
snippet near the top of your vimrc (after the ":language" statement if
any but before setting any other options or defining any mappings):
if has('multi_byte')
if &encoding !~? '^u'
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
endif
set fileencodings=ucs-bom,utf-8,Windows-1252
setglobal fileencoding=Windows-1252 bomb
else
echomsg '+multi_byte not compiled-in'
endif
Notes about the above snippet:
1) When run on a version without expression evaluation, the whole of the
above will be treated as a comment (no settings will be set, and nothing
will be echoed either).
2) There is a 'fileencodings' (plural) and a 'fileencoding' (singular).
This is intentional, they refer to two different options.
3) For explanations about, see the Vim help for the various functions
and options used, and also http://vim.wikia.org/wiki/Working_with_Unicode
If your Vim version shows +iconv/dyn but ":echo has('iconv')" answers
zero, it means that Vim has found neither iconv.dll nor libiconv.dll in
either your $PATH or your $VIMRUNTIME. You may want to get one of them
from somewhere on the Web. Google is your friend.
Best regards,
Tony.
--
Different all twisty a of in maze are you, passages little.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---