an independent Chinese IME is available

classic Classic list List threaded Threaded
70 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

StarWing

i think it used a little difficulty....just need some imploved.

On 1月4日, 下午4时37分, anhnmncb <[hidden email]> wrote:

> These lines in your script change the vim options globally, I don't think it's
> a good way.
>
>     set completeopt=menu,preview,longest
>     set pumheight=10
>
>     set completefunc=ChineseIME
>
> And why not add a advice for imap in vimscript.org instead of writing it in your
> plugin?
>
>     imap  <C-^>  <C-X><C-U><C-U><C-P><C-N>
>
> --
> Regards,
> anhnmncb
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Tony Mechelynck

On 04/01/09 15:05, StarWing wrote:

> i think it used a little difficulty....just need some imploved.
>
> On 1月4日, 下午4时37分, anhnmncb<[hidden email]>  wrote:
>> These lines in your script change the vim options globally, I don't think it's
>> a good way.
>>
>>      set completeopt=menu,preview,longest
>>      set pumheight=10
>>
>>      set completefunc=ChineseIME

Yes, all these should use ":setlocal" and be in a filetype-plugin, or
maybe in some function called only on demand; not in a global plugin
used for every file (including, let's say, C sources in ASCII or,
speaking of "human" languages, Russian text in Cyrillic).

>>
>> And why not add a advice for imap in vimscript.org instead of writing it in your
>> plugin?
>>
>>      imap<C-^>   <C-X><C-U><C-U><C-P><C-N>

Here also, ":imap <buffer> <C-^>  etc." might be better; and, as you
say, it should perhaps be commented-out by default, since some users
might prefer using another {lhs}. Myself, I don't know if my fr_BE
keyboard has a key or key combo for Ctrl-^ so I might prefer <F12> as
the {lhs}.


Best regards,
Tony.
--
A poem:                read aloud:

<> !*''#               Waka waka bang splat tick tick hash,
^"`$$-                 Caret quote back-tick dollar dollar dash,
!*=@$_                 Bang splat equal at dollar under-score,
%*<> ~#4               Percent splat waka waka tilde number four,
&[]../                 Ampersand bracket bracket dot dot slash,
|{,,SYSTEM HALTED      Vertical-bar curly-bracket comma comma CRASH.

Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand
Rapids, MI.)

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

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Sean-130

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

Improvements were made using the following options:
---------------------------------------------------------------
  g:CacheIMEDataAtStartup:
    add data file in memory at startup
    :pro: fast popup menu shown when <key> is matched
    :con: slow initial loading when vim is opened
    default: 0

  g:ChineseIMESpaceToggle:
    toggle the use of <Space> to trigger popup menu
    i_<Tab> is used to toggle this feature
    :pro: convenient and consistent like other IMEs
    :con: need to get used to <Space> key
    default: 0

  g:ChineseIMEMappingCtrl6:
    define i_<C-^> as <C-X><C-U><C-U><C-P><C-N>
    default: 0
---------------------------------------------------------------

Sean

On Jan 4, 6:54 am, Tony Mechelynck <[hidden email]>
wrote:

> On 04/01/09 15:05, StarWing wrote:
>
> > i think it used a little difficulty....just need some imploved.
>
> > On 1月4日, 下午4时37分, anhnmncb<[hidden email]>  wrote:
> >> These lines in your script change the vim options globally, I don't think it's
> >> a good way.
>
> >>      set completeopt=menu,preview,longest
> >>      set pumheight=10
>
> >>      set completefunc=ChineseIME
>
> Yes, all these should use ":setlocal" and be in a filetype-plugin, or
> maybe in some function called only on demand; not in a global plugin
> used for every file (including, let's say, C sources in ASCII or,
> speaking of "human" languages, Russian text in Cyrillic).
>
>
>
> >> And why not add a advice for imap in vimscript.org instead of writing it in your
> >> plugin?
>
> >>      imap<C-^>   <C-X><C-U><C-U><C-P><C-N>
>
> Here also, ":imap <buffer> <C-^>  etc." might be better; and, as you
> say, it should perhaps be commented-out by default, since some users
> might prefer using another {lhs}. Myself, I don't know if my fr_BE
> keyboard has a key or key combo for Ctrl-^ so I might prefer <F12> as
> the {lhs}.
>
> Best regards,
> Tony.
> --
> A poem:                read aloud:
>
> <> !*''#               Waka waka bang splat tick tick hash,
> ^"`$$-                 Caret quote back-tick dollar dollar dash,
> !*=@$_                 Bang splat equal at dollar under-score,
> %*<> ~#4               Percent splat waka waka tilde number four,
> &[]../                 Ampersand bracket bracket dot dot slash,
> |{,,SYSTEM HALTED      Vertical-bar curly-bracket comma comma CRASH.
>
> Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand
> Rapids, MI.)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Tony Mechelynck

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.

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

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Sean-130

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

Feedback is welcome.

Sean

On Jan 4, 5:22 pm, Tony Mechelynck <[hidden email]>
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

panshizhu

Sean 写道:

> 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
>
> Feedback is welcome.

Seems to have a typo on the line 122:

if !exists("g:ChineseIMESpaceToggle")
     let g:ChineseIMEMappingCtrl6 = 0
endif


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

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Sean-130

Thanks. It is fixed and more 'convenient' features for <Space>

g:ChineseIMESpaceToggle:
  toggle punctuation
  toggle the use of <Space> to trigger popup
  toggle cursor color to identify the 'IME mode'

On Jan 4, 9:45 pm, pansz <[hidden email]> wrote:

> Sean 写道:
>
> > 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
>
> > Feedback is welcome.
>
> Seems to have a typo on the line 122:
>
> if !exists("g:ChineseIMESpaceToggle")
>      let g:ChineseIMEMappingCtrl6 = 0
> endif
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

anhnmncb-2
In reply to this post by Sean-130

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.

Excellent work, thank you! But I find the only one charactor's searching still
takes some time(maybe 3~5 seconds), maybe it still can have some improving?

One suggestion, if the charctor is Chinese, then <space> should input a real
<space> instead of saids that "pattern not found".

Anyway, this time it's really ready for use!

>
> 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
>
> Feedback is welcome.
>
> Sean
>
> On Jan 4, 5:22pm, Tony Mechelynck <[hidden email]>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

anhnmncb-2
In reply to this post by Sean-130

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.

>
> Feedback is welcome.
>
> Sean
>
> On Jan 4, 5:22pm, Tony Mechelynck <[hidden email]>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

anhnmncb-2

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 <[hidden email]>
>> 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
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Sean-130

Thanks. I just made two cosmetical modification:

(1) g:ChineseIME_Toggle_InertMode (i_<C-\> as default now)
(2) g:ChineseIME_Toggle_i_Ctrl6

Sean


On Jan 5, 1:31 am, anhnmncb <[hidden email]> wrote:

> 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 <[hidden email]>
> >> 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
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: an independent Chinese IME is available

JohnBeckett

Sean wrote:
> Thanks. I just made two cosmetical modification:

Good stuff, but please follow the conventions of this mailing list:

* Bottom post, that is:
* Quote a few relevant lines; put your reply underneath.

If nothing is really relevant, delete it all.

In case anyone is wondering ... these issues have been discussed several
times, and consensus prefers bottom posting. Whatever the merits, it is
best for us to use the same conventions. I am a manager of this list
(preventing spam), and have resolved to irritate people with replies
like this so everyone is aware of how we like things. See
http://groups.google.com/group/vim_use/web/vim-information

John


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

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

anhnmncb-2
In reply to this post by Sean-130

On Tue, 06 Jan 2009 01:50:27 +0800, Sean <[hidden email]> wrote:

>
> Thanks. I just made two cosmetical modification:
>
> (1) g:ChineseIME_Toggle_InertMode (i_<C-\> as default now)
> (2) g:ChineseIME_Toggle_i_Ctrl6
>
> Sean

The new version lacks a head " in the line 192.
And IMHO you should also need to save/restore the pumheight and  
completeopt.

What about the improve for <space> behavior when in different condition
and the slow speed for searching just one charactor? :)

>
>
> On Jan 5, 1:31 am, anhnmncb <[hidden email]> wrote:
>> 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 <[hidden email]>
>> >> 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
> >
>



--
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 | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

panshizhu
In reply to this post by JohnBeckett

John Beckett 写道:
> Sean wrote:
>> Thanks. I just made two cosmetical modification:
>
> Good stuff, but please follow the conventions of this mailing list:
>
> * Bottom post, that is:
> * Quote a few relevant lines; put your reply underneath.
>
> If nothing is really relevant, delete it all.

I suggest using thunderbird, which has good support of bottom post, if
anybody knows more mail client which support bottom post well, please
tell me, thanks.

for the OP:
It seems that you mixed chinese character(字) and word(词) together
in the same dict and it would be hard for different input method to
share the same word table(词汇表).

For example if there's a new word “一个新词”, you may have pinyin,
shanpin, wubi, or something else, each of them have different mappings
for chinese character, but when you have a new word it should be valid
for all input methods.

Any work around?

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

Reply | Threaded
Open this post in threaded view
|

top/bottom posting [Re: an independent Chinese IME is available]

bill lam

On Tue, 06 Jan 2009, pansz wrote:
> I suggest using thunderbird, which has good support of bottom post, if
> anybody knows more mail client which support bottom post well, please
> tell me, thanks.

I don't think email client is a good excuse for top (or bottom) post.
Anyway if vim is configured as an external editor for composing email.
It can search for the first blank line and that should be the bottom
of quoted message.

set editor="vim -c \"set spell tw=70 et\" \"+call search('^$')\""

FWIW I use mutt.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩284 張祜  集靈臺二首之一
    日光斜照集靈台  紅樹花迎曉露開  昨夜上皇新授籙  太真含笑入簾來

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

Reply | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

Tony Mechelynck
In reply to this post by panshizhu

On 06/01/09 01:52, pansz wrote:
[...]
> I suggest using thunderbird, which has good support of bottom post, if
> anybody knows more mail client which support bottom post well, please
> tell me, thanks.
[...]

I use SeaMonkey (version 2.0 alpha) which shares much of its Mail&News
code with Thunderbird, and in particular supports both top- and
bottom-posting exactly the way Thunderbird does. One of the reasons why
I prefer SeaMonkey over Thunderbird is its "Suite" architecture -- it
includes not only a Mail/News client and an address book but also a
browser, a chat client, and, for those who know how to use it (I don't
-- but then I use Vim instead) an HTML editor. Another thing which I
like in this Suite concept is that HTTP/FTP links in mail will open the
page in the browser, RSS/Atom feeds seen in pages in the browser can
(with a one-click action in the browser) be subscribed in the mailer,
and an IRC link in either mailer or browser will open the chat client,
in all cases regardless of the "default" application settings in your
OS. Of course, other people will call "bloat" what I call "versatility",
so you should use what suits you (not me) best.

...and, yes, I realize that most of this reply is OT for this list.


Best regards,
Tony.
--
Put your Nose to the Grindstone!
                -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

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

Reply | Threaded
Open this post in threaded view
|

Re: top/bottom posting [Re: an independent Chinese IME is available]

Tony Mechelynck
In reply to this post by bill lam

On 06/01/09 02:36, bill lam wrote:

> On Tue, 06 Jan 2009, pansz wrote:
>> I suggest using thunderbird, which has good support of bottom post, if
>> anybody knows more mail client which support bottom post well, please
>> tell me, thanks.
>
> I don't think email client is a good excuse for top (or bottom) post.
> Anyway if vim is configured as an external editor for composing email.
> It can search for the first blank line and that should be the bottom
> of quoted message.
>
> set editor="vim -c \"set spell tw=70 et\" \"+call search('^$')\""
>
> FWIW I use mutt.
>

Depending on how the mail is passed to the external editor (and by what
mail useragent program), the first blank line might actually be the
boundary between the headers and the body, i.e., the top of the message
proper.

The bottom of the quoted message (before you compose your reply) should
be the bottom of what is passed to the external editor, so I recommend

        GO
or
        :$append

Best regards,
Tony.
--
Some programming languages manage to absorb change but withstand
progress.

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

Reply | Threaded
Open this post in threaded view
|

Re: top/bottom posting [Re: an independent Chinese IME is available]

Sean-130

>> The new version lacks a head " in the line 192.
>> And IMHO you should also need to save/restore the pumheight and completeopt.

DONE. Thanks

>> What about the improve for <space> behavior when in different condition

<Space> mapping is for convenience. I am not sure if more
"overloading" is good or not.  Also, to insert a normal space, one has
to use <C-V><Space>.

The i_<C-\> IME Insert Mode can do more now, for inputing Chinese
comfortably.

    => toggle punctuation
    => toggle the use of <Space> to trigger popup
    => toggle cursor color to identify the 'IME mode'
    => toggle options 'pumheight', 'completeopt', 'lazyredraw'

>> and the slow speed for searching just one charactor? :)

Technically, nothing more can be done there, as the algorithm for
searching is now doing no scanning, no loop, and no cache at all.

Perhaps we can limit the maximum item shown on the popup menu to be
something like 30? But I expect complains if someone wants to
<PageDown> everything available.  The best way, in my opinion, is to
avoid one character search, because none (human & machine) knows what
to translate except the whole list.

Now, the new version is uploaded to improve the following two things:

(1) i_<C-\>  IME Insert Mode has more default setting
(2) optional comments can be added at the middle on each line of the
data file

The (2) above is to make the data file a little more controllable,
based on my new algorithm.

For example, in the data file we have:
(The corresponding data file is also updated)

-----------------------
ma3             1   马
ma3             2   馬
ma3             3   码
ma3             4   玛
ma3             9   吗
-----------------------

By typing ma3<Space>, 5 Chinese characters will be shown in the order
specified, and the default is the first one. The design idea is to
make the whole data file "sortable" by vim sort function. I also made
the middle parts optional, avoiding restrictions as much as possible.

Feedback is always welcome.


Sean


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

Reply | Threaded
Open this post in threaded view
|

Re: top/bottom posting [Re: an independent Chinese IME is available]

anhnmncb-2

On Tue, 06 Jan 2009 13:06:25 +0800, Sean wrote:

>
>>> The new version lacks a head " in the line 192.
>>> And IMHO you should also need to save/restore the pumheight and  
>>> completeopt.
>
> DONE. Thanks
>
>>> What about the improve for <space> behavior when in different condition
>
> <Space> mapping is for convenience. I am not sure if more
> "overloading" is good or not.  Also, to insert a normal space, one has
> to use <C-V><Space>.

I think it is needed for speeding up the inputting,
input method is not only for inputting Chinese charactor,
but also for quickly input speed, and the sum of time you
need to switch back and from between English and Chinese mode is a bit  
long.

>
> The i_<C-\> IME Insert Mode can do more now, for inputing Chinese
> comfortably.
>
>     => toggle punctuation
>     => toggle the use of <Space> to trigger popup
>     => toggle cursor color to identify the 'IME mode'
>     => toggle options 'pumheight', 'completeopt', 'lazyredraw'
>
>>> and the slow speed for searching just one charactor? :)
>
> Technically, nothing more can be done there, as the algorithm for
> searching is now doing no scanning, no loop, and no cache at all.

Maybe it can be done in this way? If search for, say, "w",
then ChineseIME will just search the list that
starting from "w" and consisting just one or two charactors long.
And if search for "ww", it searches the lists
that start with "ww" and just two or three charactors long.

>
> Perhaps we can limit the maximum item shown on the popup menu to be
> something like 30? But I expect complains if someone wants to
> <PageDown> everything available.  The best way, in my opinion, is to
> avoid one character search, because none (human & machine) knows what
> to translate except the whole list.
>
> Now, the new version is uploaded to improve the following two things:
>
> (1) i_<C-\>  IME Insert Mode has more default setting
> (2) optional comments can be added at the middle on each line of the
> data file
>
> The (2) above is to make the data file a little more controllable,
> based on my new algorithm.
>
> For example, in the data file we have:
> (The corresponding data file is also updated)
>
> -----------------------
> ma3             1   马
> ma3             2   馬
> ma3             3   码
> ma3             4   玛
> ma3             9   吗
> -----------------------
>
> By typing ma3<Space>, 5 Chinese characters will be shown in the order
> specified, and the default is the first one. The design idea is to
> make the whole data file "sortable" by vim sort function. I also made
> the middle parts optional, avoiding restrictions as much as possible.
>
> Feedback is always welcome.
>
>
> Sean
>
>
> >
>



--
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 | Threaded
Open this post in threaded view
|

Re: an independent Chinese IME is available

anhnmncb-2

> On Tue, 06 Jan 2009 13:06:25 +0800, Sean wrote:
>
> Feedback is always welcome.

1. Maybe need to define an autocmd so that
when leave from insert mode, then disable ChineseIME?

2. Why not name your script to "vim" i.e. Vim Input Method for Chinese? :)

--
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
-~----------~----~----~----~------~----~------~--~---

1234