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

[vim-multibyte] vim56-33: GUI multibyte patch

Expand Messages
  • Sung-Hyun Nam
    Hello, Attached patch contains two items. One is for multibyte copy&paste in gtk+ version which is made by ChiDeok Hwang (He said
    Message 1 of 6 , Mar 26, 2000
      Hello,

      Attached patch contains two items.

      One is for multibyte copy&paste in gtk+ version which is made
      by ChiDeok Hwang <hwang@...>
      (He said COMPOUND_TEXT DND support codes will be added later).

      The other is to allow user use multibyte with 'f' or 't'...
      in gvim (vim56-33 console version now supports it).
      I mean, with this patch, gvim always connect to XIM if user use
      over-the-spot.

      For Root method, it is bad if gvim connect to XIM in normal mode.
      And for off-the-spot, it seems not bad if gvim connect to XIM in
      normal mode, because vim displays the normal commands to status
      area, and off-the-spot displays it its status area.
      Anyway, with over-the-spot, user may not surprise. If user does
      not use multibyte in normal mode, all user interface is same
      (at least, in the preedit area). Of course, status area indicates
      gvim connect to XIM if user is in normal mode and if user uses
      status area.

      Bram, if you accept this XIM patch, I think it is good if we
      have a option such as 'use_xim_in_normal_mode'.

      regards,

      namsh
    • Bram Moolenaar
      ... It s probably better to keep these as two separate patches, so that people can decide to include one or both. ... For the patch description: What problem
      Message 2 of 6 , Mar 27, 2000
        Sung-Hyun Nam wrote:

        > Attached patch contains two items.

        It's probably better to keep these as two separate patches, so that people can
        decide to include one or both.

        > One is for multibyte copy&paste in gtk+ version which is made
        > by ChiDeok Hwang <hwang@...>

        For the patch description: What problem does this fix?

        > The other is to allow user use multibyte with 'f' or 't'...
        > in gvim (vim56-33 console version now supports it).
        > I mean, with this patch, gvim always connect to XIM if user use
        > over-the-spot.
        >
        > For Root method, it is bad if gvim connect to XIM in normal mode.

        I suppose that you don't need XIM in Normal mode, because Vim commands in
        Normal mode are not multi-byte characters. However, some _arguments_ to
        commands can be multi-byte characters. Thus we can split up Normal mode a bit
        more. For example, "r" also takes an argument that is a text character. This
        is done in normal.c, "ca.nchar = safe_vgetc();". Perhaps XIM should be used
        there? Hmm, but "r" already works with multi-byte characters, thus I probably
        don't understand this.

        > Bram, if you accept this XIM patch, I think it is good if we
        > have a option such as 'use_xim_in_normal_mode'.

        It would be good if we can find a way to avoid adding another option. Users
        already have to set so many things to make Vim to work as they want! Perhaps
        there is a method that all users will like.

        --
        Overflow on /dev/null, please empty the bit bucket.

        /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
        \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
      • Sung-Hyun Nam
        ... Sorry! I was lazy. Anyway, if a multibyte user really want to split this patch, let me know. I will do. ... I hope Hwang will answer for this detailed. I
        Message 3 of 6 , Mar 27, 2000
          Bram Moolenaar wrote:
          >
          > Sung-Hyun Nam wrote:
          >
          > > Attached patch contains two items.
          >
          > It's probably better to keep these as two separate patches, so that
          > people can decide to include one or both.

          Sorry! I was lazy.
          Anyway, if a multibyte user really want to split this patch, let me
          know. I will do.

          > > One is for multibyte copy&paste in gtk+ version which is made
          > > by ChiDeok Hwang <hwang@...>
          >
          > For the patch description: What problem does this fix?

          I hope Hwang will answer for this detailed.

          I only can say, with recent Eterm and without this patch, I cannot
          copy&paste between gvim and Eterm.

          > > The other is to allow user use multibyte with 'f' or 't'...
          > > in gvim (vim56-33 console version now supports it).
          > > I mean, with this patch, gvim always connect to XIM if user use
          > > over-the-spot.
          > >
          > > For Root method, it is bad if gvim connect to XIM in normal mode.
          >
          > I suppose that you don't need XIM in Normal mode, because Vim commands in
          > Normal mode are not multi-byte characters. However, some _arguments_ to

          ?? I can use multi-byte with 'f' command. vim56 patch 33 is only for
          xterm version (Of course, user should use xterm which support multibyte
          input/output such as Eterm, rxvt, localized xterm...)

          > commands can be multi-byte characters. Thus we can split up Normal
          > mode a bit more. For example, "r" also takes an argument that is a
          > text character. This is done in normal.c, "ca.nchar =
          > safe_vgetc();". Perhaps XIM should be used there? Hmm, but "r"
          > already works with multi-byte characters, thus I probably don't
          > understand this.

          In gui version, user could not input multibyte without XIM.
          Because vim support multibyte in normal mode (with 'f' or 'r' ...),
          gvim should always connect to XIM. I cannot input multibyte in normal
          mode without my patch (though vim code support multibyte).

          > > Bram, if you accept this XIM patch, I think it is good if we
          > > have a option such as 'use_xim_in_normal_mode'.
          >
          > It would be good if we can find a way to avoid adding another
          > option. Users already have to set so many things to make Vim to
          > work as they want! Perhaps there is a method that all users will
          > like.

          As I said, if user use over-the-spot, it is almost same.
          If user does not use status area like me, he may not know this
          change.
          I just think that option for off-the-spot because I'm not sure
          off-the-spot user want to use XIM in normal mode only for 'f' or
          'r' ('r' is not important. XIM user should toggle language,
          So, I think it is same with 'R' to multibyte user when he want
          to input multibyte using 'r').

          I believe Root method user don't want to use XIM in normal mode.
          Because in Root method, user should type in another XIM window, if he
          type 'fa<CR>' in that window, the 'fa' sent to gvim. So, in normal
          mode, it is better not to connect to XIM.
          (But if someone really want to use XIM sometimes in normal mode, the
          option helps him)

          regards,

          namsh
        • Bram Moolenaar
          ... I prefer to make two official patches out of this, since they are not directly related. One to fix the copy/paste problem for Eterm, another for
          Message 4 of 6 , Mar 27, 2000
            Sung-Hyun Nam wrote:

            > > > Attached patch contains two items.
            > >
            > > It's probably better to keep these as two separate patches, so that
            > > people can decide to include one or both.
            >
            > Sorry! I was lazy.
            > Anyway, if a multibyte user really want to split this patch, let me
            > know. I will do.

            I prefer to make two "official" patches out of this, since they are not
            directly related. One to fix the copy/paste problem for Eterm, another for
            multibyte in gvim.

            > > > I mean, with this patch, gvim always connect to XIM if user use
            > > > over-the-spot.

            I'm not sure if I completely understand this. I thought that using XIM was
            either on or off for the whole gvim session. Is it possible to switch it
            on/off for each character that is obtained from the user?

            Perhaps you can explain this a bit more. Especially about the three methods
            "Root", "over-the-spot" and "off-the-spot", since that appears to make a big
            difference. I don't see it explained in doc/multibyte.txt.

            > > I suppose that you don't need XIM in Normal mode, because Vim commands in
            > > Normal mode are not multi-byte characters. However, some _arguments_ to
            >
            > ?? I can use multi-byte with 'f' command. vim56 patch 33 is only for
            > xterm version (Of course, user should use xterm which support multibyte
            > input/output such as Eterm, rxvt, localized xterm...)

            I mean, the "f" itself is not a multi-byte character, thus you don't need an
            input method to type it. Only the character that follows would require it,
            right?

            > In gui version, user could not input multibyte without XIM.
            > Because vim support multibyte in normal mode (with 'f' or 'r' ...),
            > gvim should always connect to XIM. I cannot input multibyte in normal
            > mode without my patch (though vim code support multibyte).

            XIM support was already there, your patch added using it for Normal mode,
            right? So now I wonder where else it might need to be added. Or perhaps
            where it should be removed?

            > I just think that option for off-the-spot because I'm not sure
            > off-the-spot user want to use XIM in normal mode only for 'f' or
            > 'r'

            Well, not for typing the 'f' or 'r' itself, I suppose, but for the character
            that follows.

            --
            MORTICIAN: Bring out your dead!
            [clang]
            Bring out your dead!
            [clang]
            Bring out your dead!
            CUSTOMER: Here's one -- nine pence.
            DEAD PERSON: I'm not dead!
            The Quest for the Holy Grail (Monty Python)

            /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
            \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
          • Sung-Hyun Nam
            ... I attach the splitted patches. ... Sorry my weak english. But I can say the gvim with my patch works same with the xterm vim. User can input multibyte in
            Message 5 of 6 , Mar 27, 2000
              Bram Moolenaar wrote:
              >
              > Sung-Hyun Nam wrote:
              >
              > > > > Attached patch contains two items.
              > > >
              > > > It's probably better to keep these as two separate patches, so that
              > > > people can decide to include one or both.
              > >
              > > Sorry! I was lazy.
              > > Anyway, if a multibyte user really want to split this patch, let me
              > > know. I will do.
              >
              > I prefer to make two "official" patches out of this, since they are not
              > directly related. One to fix the copy/paste problem for Eterm, another for
              > multibyte in gvim.

              I attach the splitted patches.

              > > > > I mean, with this patch, gvim always connect to XIM if user use
              > > > > over-the-spot.
              >
              > I'm not sure if I completely understand this. I thought that using
              > XIM was either on or off for the whole gvim session. Is it possible
              > to switch it on/off for each character that is obtained from the
              > user?
              >
              > Perhaps you can explain this a bit more. Especially about the three
              > methods "Root", "over-the-spot" and "off-the-spot", since that
              > appears to make a big difference. I don't see it explained in
              > doc/multibyte.txt.

              Sorry my weak english. But I can say the gvim with my patch works
              same with the xterm vim. User can input multibyte in normal mode
              if he use xterm vim (though vim just beeps).

              If i use Eterm with XIM (It supports over-the-spot like gvim),
              It always connect to XIM (There's no normal mode in xterm. ^_^).
              So, vim in Eterm also connects to XIM even in normal mode.

              If I use hanterm, localized xterm (you can imagine xterm has
              HANGUL_INPUT code in vim), vim in hanterm acts like gvim +
              on-the-spot (though gvim not yet support on-the-spot). With
              on-the-spot, user can input multibyte character base. gvim got
              character base from XIM program.

              Over-the-spot, off-thespot, gvim gets multibyte word.
              I mean XIM gets user input until user input non-multibyte-char.
              After user input non-multibyte-char (Maybe always white-space, or
              language toggle), it sends whole string to gvim.

              Root method, gvim can get lines which include space or tab.
              If user type <CR> or toggle language, XIM sends whole lines to gvim.

              And input position is different. with Over-the-spot, user see his
              input string on the cursor position. With off-the-spot, user see
              his input string on the XIM status area. (You can imagine, user see
              his normal command in the vim's status area).
              With Root method, user should input multibyte in the window which
              is pop-up by XIM, after user type <CR>, it sends to gvim window.
              So, if user use Root method, and if gvim always connects to XIM,
              it will be nightmare if he use gvim. He always switch between two
              windows using mouse.

              And if you see the multbyte.c, Root method is simple. Off-the-spot
              is some complex. over-the-spot more complex. And on-the-spot, I
              don't know well. Mozilla (CVS version) supports on-the-spot.

              > > > I suppose that you don't need XIM in Normal mode, because Vim
              > > > commands in Normal mode are not multi-byte characters. However,
              > > > some _arguments_ to
              > >
              > > ?? I can use multi-byte with 'f' command. vim56 patch 33 is only for
              > > xterm version (Of course, user should use xterm which support multibyte
              > > input/output such as Eterm, rxvt, localized xterm...)
              >
              > I mean, the "f" itself is not a multi-byte character, thus you don't need an
              > input method to type it. Only the character that follows would require it,
              > right?
              >
              > > In gui version, user could not input multibyte without XIM.
              > > Because vim support multibyte in normal mode (with 'f' or 'r' ...),
              > > gvim should always connect to XIM. I cannot input multibyte in normal
              > > mode without my patch (though vim code support multibyte).
              >
              > XIM support was already there, your patch added using it for Normal mode,
              > right? So now I wonder where else it might need to be added. Or perhaps
              > where it should be removed?
              >
              > > I just think that option for off-the-spot because I'm not sure
              > > off-the-spot user want to use XIM in normal mode only for 'f' or
              > > 'r'
              >
              > Well, not for typing the 'f' or 'r' itself, I suppose, but for the character
              > that follows.

              I just want to say gvim with my patch now works same with xterm + vim.

              regards,

              namsh
            • Bram Moolenaar
              ... Thanks. I ll turn them into official patches. Your explanation helps a bit. However, I still think that some text should be added to the on-line help.
              Message 6 of 6 , Mar 28, 2000
                Sung-Hyun Nam wrote:

                > I attach the splitted patches.

                Thanks. I'll turn them into "official" patches.

                Your explanation helps a bit. However, I still think that some text should be
                added to the on-line help. For example, what the different XIM modes are and
                how they are supported by Vim (in xterm and in GUI). If you can make a patch
                for the docs, that would be great. Some explanation is better than no
                explanation!

                --
                ARTHUR: Well, I AM king...
                DENNIS: Oh king, eh, very nice. An' how'd you get that, eh? By exploitin'
                the workers -- by 'angin' on to outdated imperialist dogma which
                perpetuates the economic an' social differences in our society! If
                there's ever going to be any progress--
                The Quest for the Holy Grail (Monty Python)

                /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
                \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
              Your message has been successfully submitted and would be delivered to recipients shortly.