I have an odd problem with mapping in Vim. I am using an Azerty keyboard.
In my .vimrc, I have the following command to quickly move between paragraphs.:
nnoremap _ {
vnoremap _ {
nnoremap è }
vnoremap è }
However, the second mapping using è is not taken into account.
After startup, if I check the mapping, I got something for :verbose map _ but nothing for :verbose map è.
Worse, if I actually type nnoremap è }in runtime, the mapping is correctly registered.
I think this is an encoding issue, but I don’t manage to find a work around.
I am using Vim 7.3 on Debian Lenny.
I am using the same .vimrc on WinXP, and it works there : the only difference is that on WinXP I am using set encoding=latin1 beforehand, while on Debian, I have not changed the default encoding which is utf-8
So basically, my question becomes why it works with encoding equals to latin1 and not utf-8 Does it have something to do with è being encoded in multiple bytes in utf-8 ?
Perhaps the
.vimrcfile encoding is not correct.You can see it using
set fileencoding, and change it using:w ++enc=utf-8or:w ++enc=iso-8859-1.