Re: imd don't take effect under linux
Dasn wrote: [... The exists() is formal way to achieve this, especially when we writing scripts. But sometimes dirty trick comes handy. e.g.: :echo exists(+ruler) - 1 , has 'ruler' :echo exists(+noruler) - 0, doesn't has 'ruler'? IIUC, this one will always be zero. If you want an if that comes true if 'ruler' is not working, use :if !exists('+ru') :set ruler? check the 'ruler' option :set noru? also check the 'ruler' option. Your choice. I don't like triggering an error if I don't have to. The advantage of this method, OTOH, is that if the option is working you get its value. And if you want to see where (if anywhere) it was set, use :verbose set ruler? or :verb set ru?. But don't forget the question mark. Best regards, Tony.
Re: imd don't take effect under linux
2006/10/1, Bram Moolenaar [EMAIL PROTECTED]: Eddy Zhao wrote: I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. I'm using gvim 7.0, with xim support, under linux, desktop is ion3 . :verbose map! Esc show: Esc * Esc:set imdCR How could I fix that? (I've searched through the mailing list archive, found a thread report the same problem, but without final conclusion) There must be something wrong with your build. When Vim leaves Insert mode, going back to Normal mode, it always disables the input method. Thus your mapping will not have an effect (well, side effects perhaps). Hi Bram, I'm using FC5 vim package, and I just build vim from source, and the problem still there. Remove inoremap ESC ESC:set imdCR setting in vimrc also don't fix the problem. Thanks Eddy
Re: imd don't take effect under linux
2006/10/2, Alexis S. L. Carvalho [EMAIL PROTECTED]: Thus spake Eddy Zhao: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. I'm using gvim 7.0, with xim support, under linux, desktop is ion3 . :verbose map! Esc show: Esc * Esc:set imdCR How could I fix that? (I've searched through the mailing list archive, found a thread report the same problem, but without final conclusion) What input method (scim, uim, kinput2, ...) are you using? And what's the value of the GTK_IM_MODULE environment variable? Hi Alexis, I'm using scim, GTK_IM_MODULE is set to scim Thanks Eddy
Re: imd don't take effect under linux
On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. -- Dasn
Re: imd don't take effect under linux
Dasn wrote: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. To see if the option is available and working (as opposed to defined but not working in this executable version) use :echo exists(+imd) The answer is zero for no (not working), nonzero (normally 1) for yes (working). Similarly in a script: if exists(+imdisable) do something else do something else endif Best regards, Tony.
Re: imd don't take effect under linux
2006/10/2, Dasn [EMAIL PROTECTED]: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. Hello Dasn, :set imd DO take effect in normal mode. :set imd? output imdisable Thanks Eddy -- Dasn
Re: imd don't take effect under linux
2006/10/2, A.J.Mechelynck [EMAIL PROTECTED]: Dasn wrote: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. To see if the option is available and working (as opposed to defined but not working in this executable version) use :echo exists(+imd) The answer is zero for no (not working), nonzero (normally 1) for yes (working). Similarly in a script: if exists(+imdisable) do something else do something else endif Best regards, Tony. Hello tony, :echo exists(+imd) output 1 Is there other things I can do to locate the problem? Thanks Eddy
Re: imd don't take effect under linux
Eddy Zhao wrote: 2006/10/2, A.J.Mechelynck [EMAIL PROTECTED]: Dasn wrote: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. To see if the option is available and working (as opposed to defined but not working in this executable version) use :echo exists(+imd) The answer is zero for no (not working), nonzero (normally 1) for yes (working). Similarly in a script: if exists(+imdisable) do something else do something else endif Best regards, Tony. Hello tony, :echo exists(+imd) output 1 Is there other things I can do to locate the problem? Thanks Eddy I'm not sure, I don't use an IME myself. (When I need CJK characters in Vim, I either paste them from somewhere else, or use the Unicode number as said under :help i_CTRL-V_digit.) But at least we know that you are supposed to have a functioning 'imdisable' option. Well, let's see what I can find in the help. Maybe you already know most of it, but as they say, there is more in two heads than in one (which is why policemen ride horses ;-) ): - Some IM servers require a helper application (usually a conversion server: kana-kanji for Japanese, pinyin-hanzi for Chinese, etc.) - Vim (IM client), the IM server, and the conversion server if any, must all be configured in a compatible way. This may require settings in ~/.vimrc, in ~/.Xdefaults, in some shell startup script, and maybe elsewhere. - Vim can use OverTheSpot, OffTheSpot or Root styles but not OnTheSpot. - Vim can use a backend server or a frontend one. Windows usually uses backend, X usually uses frontend. - If your IM server is one that Vim can fully control, you must define 'imactivatekey' according to what the IM requires. This is said to be only possible with the GTK versions of gvim at present. - Other IM-related options are 'imcdline', 'iminsert' and 'imsearch' - One of the possible ways to start the XIM (if properly configured) is from the right-click popup menu. I think these are the most important things which I can abstract from the help. Since you know how to use the XIM, you may want to read section 7 (:help mbyte-XIM) of the mbyte.txt helpfile, while trying various settings until you get somethings that works.
Re: imd don't take effect under linux
2006/10/2, A.J.Mechelynck [EMAIL PROTECTED]: Eddy Zhao wrote: 2006/10/2, A.J.Mechelynck [EMAIL PROTECTED]: Dasn wrote: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. To see if the option is available and working (as opposed to defined but not working in this executable version) use :echo exists(+imd) The answer is zero for no (not working), nonzero (normally 1) for yes (working). Similarly in a script: if exists(+imdisable) do something else do something else endif Best regards, Tony. Hello tony, :echo exists(+imd) output 1 Is there other things I can do to locate the problem? Thanks Eddy I'm not sure, I don't use an IME myself. (When I need CJK characters in Vim, I either paste them from somewhere else, or use the Unicode number as said under :help i_CTRL-V_digit.) But at least we know that you are supposed to have a functioning 'imdisable' option. Well, let's see what I can find in the help. Maybe you already know most of it, but as they say, there is more in two heads than in one (which is why policemen ride horses ;-) ): - Some IM servers require a helper application (usually a conversion server: kana-kanji for Japanese, pinyin-hanzi for Chinese, etc.) - Vim (IM client), the IM server, and the conversion server if any, must all be configured in a compatible way. This may require settings in ~/.vimrc, in ~/.Xdefaults, in some shell startup script, and maybe elsewhere. - Vim can use OverTheSpot, OffTheSpot or Root styles but not OnTheSpot. - Vim can use a backend server or a frontend one. Windows usually uses backend, X usually uses frontend. - If your IM server is one that Vim can fully control, you must define 'imactivatekey' according to what the IM requires. This is said to be only possible with the GTK versions of gvim at present. - Other IM-related options are 'imcdline', 'iminsert' and 'imsearch' - One of the possible ways to start the XIM (if properly configured) is from the right-click popup menu. I think these are the most important things which I can abstract from the help. Since you know how to use the XIM, you may want to read section 7 (:help mbyte-XIM) of the mbyte.txt helpfile, while trying various settings until you get somethings that works. Hello Tony, Thanks for the extensive info on IM. I'll read the related help in detail. Eddy.
Re: imd don't take effect under linux
On Mon, Oct 02, 2006 at 01:50:44PM +0200, A.J.Mechelynck wrote: On Sun, Oct 01, 2006 at 01:37:53PM +0800, Eddy Zhao wrote: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. Does :set imd take effect in Normal mode of your build? And you could use :set imd? to see if this option is avaliable in your build. To see if the option is available and working (as opposed to defined but not working in this executable version) use :echo exists(+imd) The answer is zero for no (not working), nonzero (normally 1) for yes (working). Similarly in a script: if exists(+imdisable) do something else do something else endif That's right. Thanks. The exists() is formal way to achieve this, especially when we writing scripts. But sometimes dirty trick comes handy. e.g.: :echo exists(+ruler) - 1 , has 'ruler' :echo exists(+noruler) - 0, doesn't has 'ruler'? :set ruler? check the 'ruler' option :set noru? also check the 'ruler' option. -- Dasn
Re: imd don't take effect under linux
Eddy Zhao wrote: I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. I'm using gvim 7.0, with xim support, under linux, desktop is ion3 . :verbose map! Esc show: Esc * Esc:set imdCR How could I fix that? (I've searched through the mailing list archive, found a thread report the same problem, but without final conclusion) There must be something wrong with your build. When Vim leaves Insert mode, going back to Normal mode, it always disables the input method. Thus your mapping will not have an effect (well, side effects perhaps). -- If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be meetings. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: imd don't take effect under linux
Thus spake Eddy Zhao: Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. I'm using gvim 7.0, with xim support, under linux, desktop is ion3 . :verbose map! Esc show: Esc * Esc:set imdCR How could I fix that? (I've searched through the mailing list archive, found a thread report the same problem, but without final conclusion) What input method (scim, uim, kinput2, ...) are you using? And what's the value of the GTK_IM_MODULE environment variable? Alexis
imd don't take effect under linux
Hello all, I'm use setting below to disable input method when enter normal mode inoremap ESC ESC:set imdCR The setting works under window, but under linux the setting don't take effect. I'm using gvim 7.0, with xim support, under linux, desktop is ion3 . :verbose map! Esc show: Esc * Esc:set imdCR How could I fix that? (I've searched through the mailing list archive, found a thread report the same problem, but without final conclusion) Thanks Eddy