Re: noimd don't works under linux

2006-11-08 Thread Eddy Zhao

2006/11/7, Yukihiro Nakadaira <[EMAIL PROTECTED]>:

On Windows, IM can be switched on/off automatically without your mapping
if +multi_byte_ime feature is enabled.

On Unix, use 'imactivatekey' option for it.  If trigger key is C-space,
do ":set imactivatekey=C-space".  But I think that IM control feature
does not work (I use GTK2 + SCIM + Anthy and it doesn't work).

If it doesn't work and you want to use SCIM with full control, this
plugin is useful.
http://yukihiro.nakadaira.googlepages.com/scim-vim.zip



Hello Yukihiro,
I can use C-space to activate/deactive IM on my system. Thanks for the help.

Does anyone have idea how to fix the original problem?

Thanks
Eddy


Re: noimd don't works under linux

2006-11-07 Thread Yukihiro Nakadaira

On Windows, IM can be switched on/off automatically without your mapping
if +multi_byte_ime feature is enabled.

On Unix, use 'imactivatekey' option for it.  If trigger key is C-space,
do ":set imactivatekey=C-space".  But I think that IM control feature
does not work (I use GTK2 + SCIM + Anthy and it doesn't work).

If it doesn't work and you want to use SCIM with full control, this
plugin is useful.
http://yukihiro.nakadaira.googlepages.com/scim-vim.zip

--
Yukihiro Nakadaira - [EMAIL PROTECTED]


Re: noimd don't works under linux

2006-11-07 Thread Eddy Zhao


 I have never used scim, nor any other IM, so this is not enough
information for me to see what is wrong.



Hi Benji, thanks for the help

Eddy


Re: noimd don't works under linux

2006-11-07 Thread Eddy Zhao


I don't use the IM myself, but I have read some of the help about it.

IIUC, the 'iminsert' influences whether Vim uses an input method:

&imi == 2   IM is active
&imi == 1   keymaps and language-mappings are active if defined
&imi == 0   neither

See ":help 'iminsert'" for details. If you aren't using Athena or Motif, you
should be able to leave either 'imd' constantly off or 'imi' constantly at 2.



Hello Tony,

I tried. When set imd constantly off, IM is not disabled automatically
when I change from insert mode to normal mode. And set imi constantly at
2, don't solve my original problem.

Any thing else I can do?

Thanks
Eddy


Re: noimd don't works under linux

2006-11-06 Thread Benji Fisher
On Mon, Nov 06, 2006 at 10:54:13PM +0800, Eddy Zhao wrote:
> 2006/11/6, Benji Fisher <[EMAIL PROTECTED]>:
[snip]
> > Perhaps it would help if you described more precisely what is not
> >working the way it should (or the way you expect).
> >
> 
> Hello Benji & Tony, thanks for tracing the problem.
> 
> Just as I described in my first posting
> 
> >Press "Esc" to change from insert mode to normal mode DO
> >disable the input method.
> >
> >But after that, when I press "i" to change from normal mode
> >back to insert mode, the input method is not enbabled (in
> >other words, I have to press C-SPACE to bring back the input
> >method).
> 
> Though status line shows imd is being reset while change from nomal
> mode to insert mode, but IM is not enabled (in other words, scim input
> window is not popup when return back to insert mode). That's the
> problem I encountered. Anything else I can try to debug to nail down
> the problem?

 I have never used scim, nor any other IM, so this is not enough
information for me to see what is wrong.

--Benji Fisher


Re: noimd don't works under linux

2006-11-06 Thread A.J.Mechelynck

Eddy Zhao wrote:
[...]

Though status line shows imd is being reset while change from nomal
mode to insert mode, but IM is not enabled (in other words, scim input
window is not popup when return back to insert mode). That's the
problem I encountered. Anything else I can try to debug to nail down
the problem?


Thanks
Eddy



I don't use the IM myself, but I have read some of the help about it.

IIUC, the 'iminsert' influences whether Vim uses an input method:

&imi == 2   IM is active
&imi == 1   keymaps and language-mappings are active if defined
&imi == 0   neither

See ":help 'iminsert'" for details. If you aren't using Athena or Motif, you 
should be able to leave either 'imd' constantly off or 'imi' constantly at 2.



Best regards,
Tony.


Re: noimd don't works under linux

2006-11-06 Thread Eddy Zhao

2006/11/6, Benji Fisher <[EMAIL PROTECTED]>:

On Mon, Nov 06, 2006 at 07:28:35PM +0800, Eddy Zhao wrote:
> 2006/11/6, Benji Fisher <[EMAIL PROTECTED]>:
[snip]
> > Part of the problem is that you defined the :map commands with <>
> >notation before setting 'nocp'.  From another post on this thread, I see
> >that you want to try this with gvim, not terminal vim.  So please try
> >
> >$ gvim -u NONE
> >:set nocp
> >:set laststatus=2 stl=%{&imd}
> >:inoremap  :set imd
> >:nnoremap i :set noimdi
> >
> >and *then* try going from Normal mode to Insert mode and back with i and
> >.  The status line should show the current value of the 'imdisable'
> >option.
> >
>
> This time status line output switch between "0" and "1"
> What it reveals ?

 This means that the 'imdisable' option is being set when you leave
Insert mode with , and it is being reset when you enter Insert mode
with i, both as intended.  Thus the source of the problem is not what
you first guessed it was.

 Perhaps it would help if you described more precisely what is not
working the way it should (or the way you expect).



Hello Benji & Tony, thanks for tracing the problem.

Just as I described in my first posting


Press "Esc" to change from insert mode to normal mode DO
disable the input method.

But after that, when I press "i" to change from normal mode
back to insert mode, the input method is not enbabled (in
other words, I have to press C-SPACE to bring back the input
method).


Though status line shows imd is being reset while change from nomal
mode to insert mode, but IM is not enabled (in other words, scim input
window is not popup when return back to insert mode). That's the
problem I encountered. Anything else I can try to debug to nail down
the problem?


Thanks
Eddy


Re: noimd don't works under linux

2006-11-06 Thread Benji Fisher
On Mon, Nov 06, 2006 at 07:28:35PM +0800, Eddy Zhao wrote:
> 2006/11/6, Benji Fisher <[EMAIL PROTECTED]>:
[snip]
> > Part of the problem is that you defined the :map commands with <>
> >notation before setting 'nocp'.  From another post on this thread, I see
> >that you want to try this with gvim, not terminal vim.  So please try
> >
> >$ gvim -u NONE
> >:set nocp
> >:set laststatus=2 stl=%{&imd}
> >:inoremap  :set imd
> >:nnoremap i :set noimdi
> >
> >and *then* try going from Normal mode to Insert mode and back with i and
> >.  The status line should show the current value of the 'imdisable'
> >option.
> >
> 
> This time status line output switch between "0" and "1"
> What it reveals ?

 This means that the 'imdisable' option is being set when you leave
Insert mode with , and it is being reset when you enter Insert mode
with i, both as intended.  Thus the source of the problem is not what
you first guessed it was.

 Perhaps it would help if you described more precisely what is not
working the way it should (or the way you expect).

HTH --Benji Fisher


Re: noimd don't works under linux

2006-11-06 Thread Eddy Zhao

2006/11/6, Benji Fisher <[EMAIL PROTECTED]>:

On Sun, Nov 05, 2006 at 03:13:20PM +0800, Eddy Zhao wrote:
[snip]
> Thanks (I forget to set ls).
>
> I do the following
> - gvim -u NONE
> - :set stl=%{&imd} ls=2
> - :inoremap  :set imd
> - :nnoremap i :set noimdi
> - :set nocp
> - switching back & forth between normal mode & insert mode using "ESC" & "i"
>
> When I pressing "i", the input focus is on command line & command line
> shows ":set noimdi".

 Part of the problem is that you defined the :map commands with <>
notation before setting 'nocp'.  From another post on this thread, I see
that you want to try this with gvim, not terminal vim.  So please try

$ gvim -u NONE
:set nocp
:set laststatus=2 stl=%{&imd}
:inoremap  :set imd
:nnoremap i :set noimdi

and *then* try going from Normal mode to Insert mode and back with i and
.  The status line should show the current value of the 'imdisable'
option.



This time status line output switch between "0" and "1"
What it reveals ?

Thanks
Eddy



 If the 0 or 1 in the status line is too terse, you could be a
little fancier.  For example,
:set laststatus=2 stl=%{&imd?'IM\ disabled':'IM\ enabled'}

HTH --Benji Fisher



Re: noimd don't works under linux

2006-11-05 Thread Benji Fisher
On Sun, Nov 05, 2006 at 03:13:20PM +0800, Eddy Zhao wrote:
[snip]
> Thanks (I forget to set ls).
> 
> I do the following
> - gvim -u NONE
> - :set stl=%{&imd} ls=2
> - :inoremap  :set imd
> - :nnoremap i :set noimdi
> - :set nocp
> - switching back & forth between normal mode & insert mode using "ESC" & "i"
> 
> When I pressing "i", the input focus is on command line & command line
> shows ":set noimdi".

 Part of the problem is that you defined the :map commands with <>
notation before setting 'nocp'.  From another post on this thread, I see
that you want to try this with gvim, not terminal vim.  So please try

$ gvim -u NONE
:set nocp
:set laststatus=2 stl=%{&imd}
:inoremap  :set imd
:nnoremap i :set noimdi

and *then* try going from Normal mode to Insert mode and back with i and
.  The status line should show the current value of the 'imdisable'
option.

 If the 0 or 1 in the status line is too terse, you could be a
little fancier.  For example,
:set laststatus=2 stl=%{&imd?'IM\ disabled':'IM\ enabled'}

HTH --Benji Fisher


Re: noimd don't works under linux

2006-11-05 Thread Eddy Zhao

I do the following
 - gvim -u NONE
 - :set stl=%{&imd} ls=2
 - :inoremap  :set imd
 - :nnoremap i :set noimdi
 - :set nocp
 - switching back & forth between normal mode & insert mode using "ESC" & "i"

When I pressing "i", the input focus is on command line & command line
shows ":set noimdi".

If I using ":nnoremap i :set noimdi", pressing "i" get me to
insert mode (with an extra newline). But switching back & forth between
normal mode & insert mode, status line always shows "0"



Does this reveal some root cause of the problem? How can I further narrow
down the problem?


Thanks
Eddy


Re: noimd don't works under linux

2006-11-05 Thread A.J.Mechelynck

Eddy Zhao wrote:
[...]

Hi Tony,

I only using IM in gvim. So I only want IM work correctly in gvim.
gvim is with +xim support.

Thanks
Eddy



Well, I suppose that explains why you can't set 'imd' in Console Vim.


Best regards,
Tony.


Re: noimd don't works under linux

2006-11-04 Thread Eddy Zhao

2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>:

Eddy Zhao wrote:
> 2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>:
>> Eddy Zhao wrote:
>> >>
>> >>  I tried this on FC2:
>> >>
>> >> :set stl=%{&imd}
>> >> :inoremap  :set imd
>> >> :nnoremap i :set noimdi
>> >>
>> >> The first line (along with my usual :set laststatus=2) means that I
>> can
>> >> check my 'imd' setting in the status line.  When I go between
>> Normal and
>> >> Insert modes with i and , it changes from 1 to 0 and back, so I
>> >> think it is working.
>> >>
>> >
>> > Yes, I get the same result.
>> >
>> >>  Please try this and see whether you get anything different.
>> Also,
>> >> try it with
>> >>
>> >> $ vim -u NONE
>> >> :set nocp
>> >>
>> >> If you get the same results but are still having trouble, then the
>> >> problem might be some other setting.
>> >>
>> >> HTH --Benji Fisher
>> >>
>> >
>> > When starting with "-u NONE", status line isn't showed.
>> > Is there anything else I can do to locate the problem?
>> >
>> > Thanks
>> > Eddy
>> >
>>
>> Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line
>> will be
>> shown, with 0 ('noimdisable') or 1 ('imdisable') on it.
>>
>>
>
> Thanks (I forget to set ls).
>
> I do the following
> - gvim -u NONE
> - :set stl=%{&imd} ls=2
> - :inoremap  :set imd
> - :nnoremap i :set noimdi
> - :set nocp
> - switching back & forth between normal mode & insert mode using "ESC" &
> "i"
>
> When I pressing "i", the input focus is on command line & command line
> shows ":set noimdi".
>
> If I using ":nnoremap i :set noimdi", pressing "i" get me to
> insert mode (with an extra newline). But switching back & forth between
> normal mode & insert mode, status line always shows "0"
>
> BTW, I discover that in vim (not gvim), even start without "-u NONE",
> statusline always shows "0" (while gvim statusline will switch between
> "0" & "1")
>
> Anything I can do to further nail down the problem?
>
> Thanks
> Eddy
>

- Is your console Vim compiled with IM support? (I suppose it is, but check
the ":version" output for +xim or +multi_byte_ime). Note: On Unix-like
systems, IM support may require X11 support, and IM functionality may require
access to an X server (thus, maybe in xterm displaying through X, not in
/dev/tty which has no access to X).

- Does it make any difference if you start Console Vim in 'nocompatible' mode,
e.g.

vim -u NONE -i NONE -N "+set stl=%{&imd} ls=2"

?



Hi Tony,

I only using IM in gvim. So I only want IM work correctly in gvim.
gvim is with +xim support.

Thanks
Eddy


Re: noimd don't works under linux

2006-11-04 Thread A.J.Mechelynck

Eddy Zhao wrote:

2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>:

Eddy Zhao wrote:
>>
>>  I tried this on FC2:
>>
>> :set stl=%{&imd}
>> :inoremap  :set imd
>> :nnoremap i :set noimdi
>>
>> The first line (along with my usual :set laststatus=2) means that I 
can
>> check my 'imd' setting in the status line.  When I go between 
Normal and

>> Insert modes with i and , it changes from 1 to 0 and back, so I
>> think it is working.
>>
>
> Yes, I get the same result.
>
>>  Please try this and see whether you get anything different.  
Also,

>> try it with
>>
>> $ vim -u NONE
>> :set nocp
>>
>> If you get the same results but are still having trouble, then the
>> problem might be some other setting.
>>
>> HTH --Benji Fisher
>>
>
> When starting with "-u NONE", status line isn't showed.
> Is there anything else I can do to locate the problem?
>
> Thanks
> Eddy
>

Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line 
will be

shown, with 0 ('noimdisable') or 1 ('imdisable') on it.




Thanks (I forget to set ls).

I do the following
- gvim -u NONE
- :set stl=%{&imd} ls=2
- :inoremap  :set imd
- :nnoremap i :set noimdi
- :set nocp
- switching back & forth between normal mode & insert mode using "ESC" & 
"i"


When I pressing "i", the input focus is on command line & command line
shows ":set noimdi".

If I using ":nnoremap i :set noimdi", pressing "i" get me to
insert mode (with an extra newline). But switching back & forth between
normal mode & insert mode, status line always shows "0"

BTW, I discover that in vim (not gvim), even start without "-u NONE",
statusline always shows "0" (while gvim statusline will switch between
"0" & "1")

Anything I can do to further nail down the problem?

Thanks
Eddy



- Is your console Vim compiled with IM support? (I suppose it is, but check 
the ":version" output for +xim or +multi_byte_ime). Note: On Unix-like 
systems, IM support may require X11 support, and IM functionality may require 
access to an X server (thus, maybe in xterm displaying through X, not in 
/dev/tty which has no access to X).


- Does it make any difference if you start Console Vim in 'nocompatible' mode, 
e.g.


vim -u NONE -i NONE -N "+set stl=%{&imd} ls=2"

?


Best regards,
Tony.


Re: noimd don't works under linux

2006-11-04 Thread Eddy Zhao

2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>:

Eddy Zhao wrote:
>>
>>  I tried this on FC2:
>>
>> :set stl=%{&imd}
>> :inoremap  :set imd
>> :nnoremap i :set noimdi
>>
>> The first line (along with my usual :set laststatus=2) means that I can
>> check my 'imd' setting in the status line.  When I go between Normal and
>> Insert modes with i and , it changes from 1 to 0 and back, so I
>> think it is working.
>>
>
> Yes, I get the same result.
>
>>  Please try this and see whether you get anything different.  Also,
>> try it with
>>
>> $ vim -u NONE
>> :set nocp
>>
>> If you get the same results but are still having trouble, then the
>> problem might be some other setting.
>>
>> HTH --Benji Fisher
>>
>
> When starting with "-u NONE", status line isn't showed.
> Is there anything else I can do to locate the problem?
>
> Thanks
> Eddy
>

Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line will be
shown, with 0 ('noimdisable') or 1 ('imdisable') on it.




Thanks (I forget to set ls).

I do the following
- gvim -u NONE
- :set stl=%{&imd} ls=2
- :inoremap  :set imd
- :nnoremap i :set noimdi
- :set nocp
- switching back & forth between normal mode & insert mode using "ESC" & "i"

When I pressing "i", the input focus is on command line & command line
shows ":set noimdi".

If I using ":nnoremap i :set noimdi", pressing "i" get me to
insert mode (with an extra newline). But switching back & forth between
normal mode & insert mode, status line always shows "0"

BTW, I discover that in vim (not gvim), even start without "-u NONE",
statusline always shows "0" (while gvim statusline will switch between
"0" & "1")

Anything I can do to further nail down the problem?

Thanks
Eddy


Re: noimd don't works under linux

2006-11-04 Thread A.J.Mechelynck

Eddy Zhao wrote:


 I tried this on FC2:

:set stl=%{&imd}
:inoremap  :set imd
:nnoremap i :set noimdi

The first line (along with my usual :set laststatus=2) means that I can
check my 'imd' setting in the status line.  When I go between Normal and
Insert modes with i and , it changes from 1 to 0 and back, so I
think it is working.



Yes, I get the same result.


 Please try this and see whether you get anything different.  Also,
try it with

$ vim -u NONE
:set nocp

If you get the same results but are still having trouble, then the
problem might be some other setting.

HTH --Benji Fisher



When starting with "-u NONE", status line isn't showed.
Is there anything else I can do to locate the problem?

Thanks
Eddy



Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line will be 
shown, with 0 ('noimdisable') or 1 ('imdisable') on it.



Best regards,
Tony.


Re: noimd don't works under linux

2006-11-04 Thread Eddy Zhao


 I tried this on FC2:

:set stl=%{&imd}
:inoremap  :set imd
:nnoremap i :set noimdi

The first line (along with my usual :set laststatus=2) means that I can
check my 'imd' setting in the status line.  When I go between Normal and
Insert modes with i and , it changes from 1 to 0 and back, so I
think it is working.



Yes, I get the same result.


 Please try this and see whether you get anything different.  Also,
try it with

$ vim -u NONE
:set nocp

If you get the same results but are still having trouble, then the
problem might be some other setting.

HTH --Benji Fisher



When starting with "-u NONE", status line isn't showed.
Is there anything else I can do to locate the problem?

Thanks
Eddy


Re: noimd don't works under linux

2006-11-04 Thread Benji Fisher
On Fri, Nov 03, 2006 at 09:45:22PM +0800, Eddy Zhao wrote:
> Hi All,
> 
> I Have the below configuration in vimrc
>inoremap  :set imd
>nnoremap i :set noimdi
> 
> Press "Esc" to change from insert mode to normal mode DO
> disable the input method.
> 
> But after that, when I press "i" to change from normal mode
> back to insert mode, the input method is not enbabled (in
> other words, I have to press C-SPACE to bring back the input
> method).
> 
> I've tried on below software enviroment, all doesn't get things
> work (vim is with xim support)
> - fc5+ion3+scim+vim7.0(selfbuild & officalrpm)
> - fc6+gnome+scim+vim7.0(selfbuild & officalrpm)
> 
> Meanwhile, the configuration works on windows.
> 
> I've posted on mailing list similar problem before, but get no
> solution, the feature is so important, so I'm posting it again.
> Hope someone have the solution.
> 
> Thanks
> Eddy

 I tried this on FC2:

:set stl=%{&imd}
:inoremap  :set imd
:nnoremap i :set noimdi

The first line (along with my usual :set laststatus=2) means that I can
check my 'imd' setting in the status line.  When I go between Normal and
Insert modes with i and , it changes from 1 to 0 and back, so I
think it is working.

 Please try this and see whether you get anything different.  Also,
try it with

$ vim -u NONE
:set nocp

If you get the same results but are still having trouble, then the
problem might be some other setting.

HTH --Benji Fisher


noimd don't works under linux

2006-11-03 Thread Eddy Zhao

Hi All,

I Have the below configuration in vimrc
   inoremap  :set imd
   nnoremap i :set noimdi

Press "Esc" to change from insert mode to normal mode DO
disable the input method.

But after that, when I press "i" to change from normal mode
back to insert mode, the input method is not enbabled (in
other words, I have to press C-SPACE to bring back the input
method).

I've tried on below software enviroment, all doesn't get things
work (vim is with xim support)
- fc5+ion3+scim+vim7.0(selfbuild & officalrpm)
- fc6+gnome+scim+vim7.0(selfbuild & officalrpm)

Meanwhile, the configuration works on windows.

I've posted on mailing list similar problem before, but get no
solution, the feature is so important, so I'm posting it again.
Hope someone have the solution.

Thanks
Eddy