Loading ...
Sorry, an error occurred while loading the content.

imd don't take effect under linux

Expand Messages
  • Eddy Zhao
    Hello all, I m use setting below to disable input method when enter normal mode inoremap :set imd The setting works under window, but under
    Message 1 of 14 , Sep 30, 2006
    • 0 Attachment
      Hello all,

      I'm use setting below to disable input method when enter normal mode

      inoremap <ESC> <ESC>:set imd<CR>

      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 imd<CR>

      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
    • Eddy Zhao
      ... Sorry typo, works under windows
      Message 2 of 14 , Sep 30, 2006
      • 0 Attachment
        >
        > The setting works under window, but under linux the setting don't
        >

        Sorry typo, "works under windows "
      • Bram Moolenaar
        ... 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
        Message 3 of 14 , Oct 1, 2006
        • 0 Attachment
          Eddy Zhao wrote:

          > I'm use setting below to disable input method when enter normal mode
          >
          > inoremap <ESC> <ESC>:set imd<CR>
          >
          > 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 imd<CR>
          >
          > 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 -- Bram@... -- 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 ///
        • Alexis S. L. Carvalho
          ... What input method (scim, uim, kinput2, ...) are you using? And what s the value of the GTK_IM_MODULE environment variable? Alexis
          Message 4 of 14 , Oct 1, 2006
          • 0 Attachment
            Thus spake Eddy Zhao:
            > Hello all,
            >
            > I'm use setting below to disable input method when enter normal mode
            >
            > inoremap <ESC> <ESC>:set imd<CR>
            >
            > 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 imd<CR>
            >
            > 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
          • Eddy Zhao
            ... Hi Bram, I m using FC5 vim package, and I just build vim from source, and the problem still there. Remove inoremap :set imd setting in
            Message 5 of 14 , Oct 1, 2006
            • 0 Attachment
              2006/10/1, Bram Moolenaar <Bram@...>:
              >
              > Eddy Zhao wrote:
              >
              > > I'm use setting below to disable input method when enter normal mode
              > >
              > > inoremap <ESC> <ESC>:set imd<CR>
              > >
              > > 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 imd<CR>
              > >
              > > 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 imd<CR>"
              setting in vimrc also don't fix the problem.

              Thanks
              Eddy
            • Eddy Zhao
              ... Hi Alexis, I m using scim, GTK_IM_MODULE is set to scim Thanks Eddy
              Message 6 of 14 , Oct 1, 2006
              • 0 Attachment
                2006/10/2, Alexis S. L. Carvalho <alexis@...>:
                > Thus spake Eddy Zhao:
                > > Hello all,
                > >
                > > I'm use setting below to disable input method when enter normal mode
                > >
                > > inoremap <ESC> <ESC>:set imd<CR>
                > >
                > > 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 imd<CR>
                > >
                > > 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
              • Dasn
                ... 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
                Message 7 of 14 , Oct 2, 2006
                • 0 Attachment
                  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 imd<CR>
                  >
                  > 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
                • A.J.Mechelynck
                  ... To see if the option is available and working (as opposed to defined but not working in this executable version) use ... The answer is zero for no (not
                  Message 8 of 14 , Oct 2, 2006
                  • 0 Attachment
                    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 imd<CR>
                    >>
                    >> 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.
                  • Eddy Zhao
                    ... Hello Dasn, :set imd DO take effect in normal mode. :set imd? output imdisable Thanks Eddy
                    Message 9 of 14 , Oct 2, 2006
                    • 0 Attachment
                      2006/10/2, Dasn <dasn@...>:
                      > 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 imd<CR>
                      > >
                      > > 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
                      >
                      >
                    • Eddy Zhao
                      ... Hello tony, :echo exists( +imd ) output 1 Is there other things I can do to locate the problem? Thanks Eddy
                      Message 10 of 14 , Oct 2, 2006
                      • 0 Attachment
                        2006/10/2, A.J.Mechelynck <antoine.mechelynck@...>:
                        > 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 imd<CR>
                        > >>
                        > >> 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
                      • A.J.Mechelynck
                        ... 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
                        Message 11 of 14 , Oct 2, 2006
                        • 0 Attachment
                          Eddy Zhao wrote:
                          > 2006/10/2, A.J.Mechelynck <antoine.mechelynck@...>:
                          >> 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 imd<CR>
                          >> >>
                          >> >> 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.
                        • Eddy Zhao
                          ... Hello Tony, Thanks for the extensive info on IM. I ll read the related help in detail. Eddy.
                          Message 12 of 14 , Oct 2, 2006
                          • 0 Attachment
                            2006/10/2, A.J.Mechelynck <antoine.mechelynck@...>:
                            > Eddy Zhao wrote:
                            > > 2006/10/2, A.J.Mechelynck <antoine.mechelynck@...>:
                            > >> 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 imd<CR>
                            > >> >>
                            > >> >> 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.
                          • Dasn
                            ... That s right. Thanks. The exists() is formal way to achieve this, especially when we ... -- Dasn
                            Message 13 of 14 , Oct 2, 2006
                            • 0 Attachment
                              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 imd<CR>
                              > >>
                              > >>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
                            • A.J.Mechelynck
                              Dasn wrote: [... ... IIUC, this one will always be zero. If you want an if that comes true if ruler is not working, use :if !exists( +ru ) ... Your
                              Message 14 of 14 , Oct 3, 2006
                              • 0 Attachment
                                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.
                              Your message has been successfully submitted and would be delivered to recipients shortly.