edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

MacVIM fails to handle accented character input #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
OS X 10.6.1
MacVIM Snapshot 49
No custom .vimrc/.vim/.viminfo, clean slate.

When trying to work with commands such as find, replace, etc, MacVIM fails to 
work with accented 
characters such as áéíóúñ.

For example "fó" will find the letter "ó" in the current line. 

However, to enter that character in the standard OS X English keyboard layout, 
you normally do 
(OPTION E + o).

MacVim catches the initial OPTION E, and obviously, it fails, because normal OS 
X behavior is to do 
OPTION E + character. You can never input an accented character (and I suppose 
many other types of 
characters such as ñ, that work with OPTION N + n).

OPTION E + SPACE gives ´

Using standard OS X vim on the Terminal with Basic profile (make sure you don't 
have option/alt as 
meta enabled) works fine. 

Test case:
Copy this line:

Helló hów áré you?

Now try some commands such as:

fó
tá
(hover over a character and) ré

Always use option e + o (or any other spanish vowel, aeiou)

Original issue reported on code.google.com by santusm...@gmail.com on 8 Oct 2009 at 9:50

GoogleCodeExporter commented 9 years ago
In a way, this something of a shortcoming in Vim itself which would be 
difficult to fix (I guess).

You can work around this by using the old IM code which handles "marked text" 
entirely in the frontend 
(without involving Vim).  This is not as nice to use as the new (inline) IM 
code but it will solve your problem.

Open up Terminal and type:

defaults write org.vim.MacVim MMUseInlineIm 1

Then restart MacVim.

If you want to revert to the default behavior, enter the same command but swap 
the "1" for a "0".

Original comment by bjorn.winckler@gmail.com on 8 Oct 2009 at 4:17

GoogleCodeExporter commented 9 years ago
That setting, changes nothing, I still can't use accented characters in my 
normal commands.

VIM by itself works fine.

Original comment by santusm...@gmail.com on 8 Oct 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Then you have either mistyped something or you did not quit and restart MacVim 
(you really have to Quit 
completely for this change to have any effect).

You can notice that this setting has been enabled as follows (type commands 
from normal mode in Vim):

iabc<Esc>I<M-e>

If the setting is enabled, typing <M-e> (Alt-e) will overwrite the "a" with 
"´".  If it is not enabled, the text 
"abc" will be shifted right one step to accomodate the "´".  I'm using a US 
Enligsh layout to get <M-e> to print 
"´" but you can use any accent you like in its stead if you have another 
layout.

Original comment by bjorn.winckler@gmail.com on 8 Oct 2009 at 5:09

GoogleCodeExporter commented 9 years ago
same annoying issue here ;(  MMUseInlineIm didn't worked on 7.3

Original comment by fmcama...@gmail.com on 7 Dec 2010 at 4:24

GoogleCodeExporter commented 9 years ago
Issue 270 has been merged into this issue.

Original comment by bjorn.winckler@gmail.com on 9 Dec 2010 at 2:50

GoogleCodeExporter commented 9 years ago
Issue 287 has been merged into this issue.

Original comment by bjorn.winckler@gmail.com on 9 Dec 2010 at 2:51

GoogleCodeExporter commented 9 years ago
You can disable inline IM in the "Advanced" preferences in MacVim 7.3 which 
will work around this problem. Do quit and restart after unchecking this option.

This is not meant as a permanent solution.  I will have to address this problem 
with a future patch.

Original comment by bjorn.winckler@gmail.com on 9 Dec 2010 at 2:55