Friday, May 27, 2011

Re: langmap & utf8 encoding

On 27/05/11 11:15, Gour-Gadadhara Dasa wrote:
> Hello,
>
> after some years spent with Emacs (used it due to 'possibly' better Haskell
> mode), I'm back with here and my wrists are telling me: "Thank you!".
>
> I want to learn Vim and use it for all my writings which means native
> texts as well as (python+qt) programming. One problem is that Vim's
> command mode commands are suitable for US keyboard layout, but I use
> Croatian one which has the following mapping:
>
> š --> [
> Š --> {
> đ --> ]
> Đ --> }
> [ --> altgr+f
> ] --> altgr+g
> { --> altgr+b
> } --> altgr+n
> ....
>
> I can bear and use e.g. altgr+[ to get square bracket while doing Python
> programming, but using CTRL-altgr+g instead of CTRL-] is too much like Emacs
> and I do not want to go back there. :-)
>
> I read about 'langmap' option and tried to put the following in my .vimrc:
>
> set langmap=đ]
>
> in order to be able to use: CTRL-đ to simulate CTRL-].
>
> Have I misunderstood langmap feature or do I miss something?
>
> I've found the following tip:
>
> http://vim.wikia.com/wiki/VimTip1348
>
> but found some other info that langmap should work with utf-8 encoding in
> vim>=7.2.x.
>
> Any one can help?
>
>
> Sincerely,
> Gour
>

On my Belgian keyboard, [ and ] are also obtained by some AltGr
combination, see http://users.skynet.be/antoine.mechelynck/other/keybbe.htm

I can bear using AltGr+dead-^ (which then stops being a dead key) and
AltGr+$ to get square brackets, but to follow hotlinks in the help and
stop abbreviations I use the following:

:map <F9> <C-]>
:map! <F9> <C-]>

This is one of the first mappings I created (in Vim 6.0 or 6.1, when I
didn't yet know that my keyboard could produce the Ctrl-] code), it
worked then and it still works now.

For help hotlinks (or jumping to tags), double-clicking can also be used
(unless, of course, you want your hands manacled in front of ASDF [or
QSDF depending on locale] and HJKL, and your mouse unplugged, like I've
heard said that some Vim users do :-P ).


Best regards,
Tony.
--
When I heated my home with oil, I used an average of 800 gallons a
year. I have found that I can keep comfortably warm for an entire
winter with slightly over half that quantity of beer.
-- Dave Barry, "Postpetroleum Guzzler"

--
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

No comments: