On 2009-01-05, anhnmncb wrote:
>
> On 2009-01-05, Sean wrote:
>>
>> Now, this plugin is ready.
>>
>> Performance is boosted.
>> No more cache, no more full table scan, after the data file is sorted
>> first.
>>
>> The new version can be downloaded from
>> http://vim.sourceforge.net/scripts/script.php?script_id=2506
>>
>> The new sample data file can be downloaded from
>> http://maxiangjiang.googlepages.com/ChineseIME.dict
>
> Actually, the options of 'pumheight' and 'completeopt' take effect globally,
> so it's no use to set them locally, I think you can add some variables, so it
> works in this way: when IME is on, store their settings then set them, when
> off, restore theirs.
Here is my way:
let s:ywim = 0
function YW_IMtoggle()
if s:ywim == 0
let s:oldpumheight = &pumheight
let s:oldcompleteopt = &completeopt
let g:ChineseIMESpaceToggle=1
set pumheight=10
set completeopt=menu,preview,longest
let s:ywim = 1
elseif s:ywim == 1
let g:ChineseIMESpaceToggle=0
let s:ywim = 0
set pumheight=s:oldpumheight
set completeopt=s:oldcompleteopt
endif
endfunction
imap <C-\> <C-o>:call YW_IMtoggle()<CR>
I think use <C-\> or something others instead of <tab> is better.
>
>>
>> Feedback is welcome.
>>
>> Sean
>>
>> On Jan 4, 5:22pm, Tony Mechelynck <[email protected]>
>> wrote:
>>> On 05/01/09 00:57, Sean wrote:> Hello,
>>>
>>> > Thanks for comments and encourages from everyone, I have just uploaded
>>> > a new version with all suggestions considered. It is available on
>>> >http://vim.sourceforge.net/scripts/script.php?script_id=2506
>>>
>>> [...]
>>>
>>> Note that if (like me) you have downloaded a previous version of this
>>> script, you may need to wipe your browser's cache in order to see the
>>> new version (e.g. refresh the page with Ctrl-Shift-R in Firefox or
>>> SeaMonkey).
>>>
>>> Best regards,
>>> Tony.
>>> --
>>> Life would be so much easier if we could just look at the source code.
>> >
>>
>
>
--
Regards,
anhnmncb
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---