On Sun, 04 Jan 2009 16:09:41 +0800, pansz <[email protected]> wrote:

>
> Sean 写道:
>>
>>> 1. cannot use space for completion, which is very common in IMEs.
>>
>> If you want, you can map <space> as
>> imap  <Space>  <C-X><C-U><C-U><C-P><C-N>
> Well, it works, but we will be unable to type the space character at
> all. For <space> to work we may need a "mode" then, simple ascii insert
> mode and complex character input mode.

I use these lines for toggle im:

let s:ywim = 0
function YW_IMtoggle()
     if s:ywim == 0
         imap <space> <C-x><C-u><C-u><C-p><C-n>
         let s:ywim = 1
     elseif s:ywim == 1
         iunmap <space>
         let s:ywim = 0
     endif
endfunction

imap <C-\> <C-o>:call YW_IMtoggle()<CR>

>
>
>>> 4. cannot match the first characters if the whole word missing: type
>>> woyao<C-I> and nothing happens, we expect 'wo' can be matched and show
>>> 我, since the problem here is woyao not recorded as vocabulary.
>> The feature you mentioned here seems like "associate" (联想), which is
>> not available for vim omni completion.
>
> What I meant is not "associate" 联想, it is (say) part-completion:
>
> for example: suppose we have the following in the dict:
> aaa   阿
> aaa   啊
> bbb   波
> bbb   播
>
> but we don't have the vocabulary: aaabbb.
>
> Then how can I complete when I type: aaabbb? Typical IM should try to
> complete something as possible, so when we press <space> it tries to
> complete aaa as 阿 and/or open the selection menu for aaa, leaving bbb
> behind, then if we press <space> again, it will try to complete bbb to
> 波 and/or open the selection menu for bbb.
>
> This is also useful even if we had an item in the dict and we want other
> combinations:
>
> aaabbb  阿波
>
> now if we type aaabbb and want it to complete to 啊播,how? when we
> press the first <space> we should get a menu which list 阿波 as the
> first item and 阿 and 啊 as the second, third item。if we selected 阿波
> then everything finished, if we selected 啊, then we will got the menu
> for the next character which shows 波 and 播。
>
>
>
> >
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to