1

Re: problem with input method when switching mode

hi
I'm using vs2008 with viemu, and it's very comfortable.

When I try to add some comment to the code, I often switch to normal mode to move, then insert. But when I switch to normal mode, viemu turn off the current input method, therefore I've got to press ctrl-space every time I enter insert mode.

Is there a way to make the input method stay?

Thanks!

2

Re: problem with input method when switching mode

Hello!

Indeed, I especifically coded in that behavior. My thinking is that hiragana/katakana/kanji or other similar input methods didn't make sense in normal mode, as only latin characters are commands. IIRC, vim also does it, I probably checked it at the time, but I am not sure.

But, of course, I'm not an expert in Japanese/Chinese/Korean input, so I would be glad to change this back if it doesn't make sense. If its interest is "it depends", then I suppose I should add a user preference or so.

Please, let me know the details and I'll be happy to try and add it to one of the next versions of ViEmu.

Best regards,

  -- Jon

3

Re: problem with input method when switching mode

Hi Jon,
About this problem, sure that only latin characters are commands in normal mode.Vim itself support |+multi_byte_ime| feature,
see here:
http://vimdoc.sourceforge.net/htmldoc/mbyte.html#mbyte-IME

Think about this senario:
User writing a mail in non-ascii language by using a IME, he decide to delete a line,so he need to
1,press ctrl+space or shift+space to turn off the IME,
2,press esc and dd,a
3,press ctrl+space again to turn on IME and continue writing.

So support imactivatekey and iminsert option would be great helpfull.If user need this feature,they will add such settings in their viemurc file.

set imactivatekey=C-space
inoremap <ESC> <ESC>:set iminsert=2<CR>

After support those options, user want to delete a line,he need to
1,press esc,(viemu help to turn off IME,remember IME status),
2,dd,a(viemu help to restore IME status)
3,continue to writing in non-ascii languages.

It will reduce times of switch status of IME manually.

Thanks~

Last edited by ipfilter (2009-11-11 14:52:01)

4

Re: problem with input method when switching mode

Hello,

My apologies for not responding earlier, and thanks much for the very good and detailed explanation. Now I understand how it should really work. Unfortunately I can't implement it right away, but I'm taking note of the suggestion so that I can add this in a future version. I am considering providing the tools to implement this the day ViEmu is scriptable, as it could help have it earlier, and address other issues that ViEmu users have requested.

Thanks and happy holidays!

  -- Jon