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

Re: Switching XIM on and off

Expand Messages
  • Bram Moolenaar
    ... OK, so for English mode the IME is still used. ... [...] ... When the XIM is disabled, this means you can type English, right? Thus isn t switching the
    Message 1 of 14 , Mar 8, 2001
    View Source
    • 0 Attachment
      Sung-Hyun Nam wrote:

      > Bram Moolenaar wrote:
      > >
      > > Wouldn't it be better if xim_set_preedit() doesn't call xim_set_focus()?
      > > Instead we would call xim_set_focus() in the same places where the ":lmap"
      > > mappings are enabled, to switch between English and language characters.
      >
      > Windows and Unix is different. I have no knowledge (especially Windows).
      > Next is just my experience.
      >
      > Windows: First of all, VIM always connect to IME.
      >
      > While input english, it acts like OverTheSpot(or OnTheSPot).
      > While input multibyte, it acts like OffTheSpot, but somewhat
      > different to XIM. IME send a ONE multibyte to VIM when composing
      > ends.

      OK, so for English mode the IME is still used.

      > Unix :
      [...]
      > I believe VIM cannot set 'Native language' or 'English' Mode.
      > VIM only can do 'enable' or 'disable' XIM. and user set language
      > mode manually. Well, in my case, when XIM enabled, it enters to
      > previous language mode. But, I think it's not the same
      > situation in Windows (Origin and English mode).

      When the XIM is disabled, this means you can type English, right? Thus isn't
      switching the XIM on/off nearly equal to switching between English and
      language mode?

      --
      hundred-and-one symptoms of being an internet addict:
      92. It takes you two hours to check all 14 of your mailboxes.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Nam SungHyun
      ... When the XIM is disabled, VIM got a character from the X(?). When the XIM is enabled, user can select language mode. And XIM handle user input and send a
      Message 2 of 14 , Mar 8, 2001
      View Source
      • 0 Attachment
        Bram Moolenaar wrote:
        >
        > Sung-Hyun Nam wrote:
        >
        > > Unix :
        > [...]
        > > I believe VIM cannot set 'Native language' or 'English' Mode.
        > > VIM only can do 'enable' or 'disable' XIM. and user set language
        > > mode manually. Well, in my case, when XIM enabled, it enters to
        > > previous language mode. But, I think it's not the same
        > > situation in Windows (Origin and English mode).
        >
        > When the XIM is disabled, this means you can type English, right?
        > Thus isn't switching the XIM on/off nearly equal to switching between
        > English and language mode?

        When the XIM is disabled, VIM got a character from the X(?).
        When the XIM is enabled, user can select language mode.
        And XIM handle user input and send a character to VIM both english
        character or native language.
        Because english character does not need to compose, XIM send the
        character immediately.

        regards,

        namsh
      • Bram Moolenaar
        ... Let s use an example: You are inserting Korean characters, thus XIM is set to your language mode. Then you hit and you want to type some Normal mode
        Message 3 of 14 , Mar 8, 2001
        View Source
        • 0 Attachment
          Sung-Hyun Nam wrote:

          > > > Unix :
          > > [...]
          > > > I believe VIM cannot set 'Native language' or 'English' Mode.
          > > > VIM only can do 'enable' or 'disable' XIM. and user set language
          > > > mode manually. Well, in my case, when XIM enabled, it enters to
          > > > previous language mode. But, I think it's not the same
          > > > situation in Windows (Origin and English mode).
          > >
          > > When the XIM is disabled, this means you can type English, right?
          > > Thus isn't switching the XIM on/off nearly equal to switching between
          > > English and language mode?
          >
          > When the XIM is disabled, VIM got a character from the X(?).
          > When the XIM is enabled, user can select language mode.
          > And XIM handle user input and send a character to VIM both english
          > character or native language.
          > Because english character does not need to compose, XIM send the
          > character immediately.

          Let's use an example: You are inserting Korean characters, thus XIM is set to
          your language mode. Then you hit <Esc> and you want to type some Normal mode
          command, like "j". Currently, the user has to first switch the XIM mode to
          English, right? That is an extra action the user has to do.

          My idea was that when Vim switches from Insert mode to Normal mode, the XIM
          would be disabled, thus the typed characters are obtained directly, and you
          don't need to switch language mode in the XIM. When you enter Insert mode
          again, the XIM would be enabled and you are back in your language mode
          automatically.

          Thus the idea is to avoid the need to have the user manually switch his XIM
          between English and language mode.

          --
          hundred-and-one symptoms of being an internet addict:
          95. Only communication in your household is through email.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
          \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
        • Nam SungHyun
          ... Yes. Terminal+xim+vim user should do that. ... So, you will apply my patch (at least edit.c patch), right? :) And then, gvim user has a benefit than
          Message 4 of 14 , Mar 8, 2001
          View Source
          • 0 Attachment
            Bram Moolenaar wrote:
            >
            > Sung-Hyun Nam wrote:
            >
            > > > > Unix :
            > > > [...]
            > > > > I believe VIM cannot set 'Native language' or 'English' Mode.
            > > > > VIM only can do 'enable' or 'disable' XIM. and user set language
            > > > > mode manually. Well, in my case, when XIM enabled, it enters to
            > > > > previous language mode. But, I think it's not the same
            > > > > situation in Windows (Origin and English mode).
            > > >
            > > > When the XIM is disabled, this means you can type English, right?
            > > > Thus isn't switching the XIM on/off nearly equal to switching between
            > > > English and language mode?
            > >
            > > When the XIM is disabled, VIM got a character from the X(?).
            > > When the XIM is enabled, user can select language mode.
            > > And XIM handle user input and send a character to VIM both english
            > > character or native language.
            > > Because english character does not need to compose, XIM send the
            > > character immediately.
            >
            > Let's use an example: You are inserting Korean characters, thus XIM is
            > set to your language mode. Then you hit <Esc> and you want to type
            > some Normal mode command, like "j". Currently, the user has to first
            > switch the XIM mode to English, right? That is an extra action the
            > user has to do.

            Yes. Terminal+xim+vim user should do that.

            > My idea was that when Vim switches from Insert mode to Normal mode,
            > the XIM would be disabled, thus the typed characters are obtained
            > directly, and you don't need to switch language mode in the XIM. When
            > you enter Insert mode again, the XIM would be enabled and you are back
            > in your language mode automatically.
            >
            > Thus the idea is to avoid the need to have the user manually switch his XIM
            > between English and language mode.

            So, you will apply my patch (at least edit.c patch), right? :)
            And then, gvim user has a benefit than terminal-version.

            regards,

            namsh
          • Chong-Dae Park
            ... Yes. You are right. But... Many programmers are also feel that this is stupid. And there is a hack. If a user types , XIM changes mode to English
            Message 5 of 14 , Mar 8, 2001
            View Source
            • 0 Attachment
              On Thu, Mar 08, 2001 at 12:54:37PM +0100, Bram Moolenaar wrote:
              > Let's use an example: You are inserting Korean characters, thus XIM is set to
              > your language mode. Then you hit <Esc> and you want to type some Normal mode
              > command, like "j". Currently, the user has to first switch the XIM mode to
              > English, right? That is an extra action the user has to do.

              Yes. You are right.
              But... Many programmers are also feel that this is stupid.
              And there is a hack. If a user types <ESC>, XIM changes mode to English
              automatically.

              (It makes emacs users unhappy and make patchs that make this behavior
              optional.)

              As I know, Windows Input Method does not support it because Windows is not
              VI-friendly.

              --
              Chong-Dae Park
              -- ' C-language Edition
              #define cdpark /* TC Lab, Div. of CS, Dept. of EECS, KAIST */
              #include <signature.h> /* the Hitchhiker's Guide to the Internet?? */
            • Bram Moolenaar
              ... Yes, I will now include the switching of XIM on/off. I ll do that for Insert mode, entering a search pattern and for the argument of commands like r and
              Message 6 of 14 , Mar 8, 2001
              View Source
              • 0 Attachment
                Sung-Hyun Nam wrote:

                > So, you will apply my patch (at least edit.c patch), right? :)
                > And then, gvim user has a benefit than terminal-version.

                Yes, I will now include the switching of XIM on/off. I'll do that for Insert
                mode, entering a search pattern and for the argument of commands like "r" and
                "f". Please check in the next version that this works well.

                --
                hundred-and-one symptoms of being an internet addict:
                100. The most exciting sporting events you noticed during summer 1996
                was Netscape vs. Microsoft.

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
                \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
              Your message has been successfully submitted and would be delivered to recipients shortly.