Re: noimd don't works under linux
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 ESC ESC:set imdCR :nnoremap i :set noimdCRi and *then* try going from Normal mode to Insert mode and back with i and Esc. 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 Esc, 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
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
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
I do the following - gvim -u NONE - :set stl=%{imd} ls=2 - :inoremap ESC ESC:set imdCR - :nnoremap i :set noimdCRi - :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 noimdCRi. If I using :nnoremap i :set noimdCRiCR, 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
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 ESC ESC:set imdCR - :nnoremap i :set noimdCRi - :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 noimdCRi. 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 ESC ESC:set imdCR :nnoremap i :set noimdCRi and *then* try going from Normal mode to Insert mode and back with i and Esc. 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
I tried this on FC2: :set stl=%{imd} :inoremap ESC ESC:set imdCR :nnoremap i :set noimdCRi 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 Esc, 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
Eddy Zhao wrote: I tried this on FC2: :set stl=%{imd} :inoremap ESC ESC:set imdCR :nnoremap i :set noimdCRi 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 Esc, 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/5, A.J.Mechelynck [EMAIL PROTECTED]: Eddy Zhao wrote: I tried this on FC2: :set stl=%{imd} :inoremap ESC ESC:set imdCR :nnoremap i :set noimdCRi 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 Esc, 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 ESC ESC:set imdCR - :nnoremap i :set noimdCRi - :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 noimdCRi. If I using :nnoremap i :set noimdCRiCR, 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/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 ESC ESC:set imdCR :nnoremap i :set noimdCRi 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 Esc, 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 ESC ESC:set imdCR - :nnoremap i :set noimdCRi - :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 noimdCRi. If I using :nnoremap i :set noimdCRiCR, 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