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

Re: imd don't take effect under linux

Expand Messages
  • 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 1 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 2 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 3 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 4 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 5 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 6 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 7 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.