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

Re: Bug report and IME suggestions

Expand Messages
  • Glenn Maynard
    ... I don t recall. However, Vim is very exceptional in enabling the IME explicitely (in any mode) by default. ... Who originally implemented the Windows IME
    Message 1 of 12 , Jun 4, 2002
    • 0 Attachment
      On Tue, Jun 04, 2002 at 11:05:09PM +0200, Bram Moolenaar wrote:
      > In Normal mode IME should always be off by default (and it can only be
      > switched on by some key chord, I suppose). That it's on sounds like a
      > bug.

      I don't recall. However, Vim is very exceptional in enabling the IME
      explicitely (in any mode) by default.

      > I suppose most Japanese people are using their specific codepage, thus
      > we should be able to check for that. Don't know how many people in
      > other Asian countries use Unicode or their specific encoding.

      Who originally implemented the Windows IME code? Maybe they can comment.

      > > >> 4) I have some gripes with the way the enabled/disabled status of the
      > > >> IME is remembered by vim. There is no reason to ever want to enable the
      > > >> IME in normal or visual mode. But I have frequently enabled the IME in
      > > >> normal mode by mistake, only to change it back when I ineffectually type
      > > >> a few commands and realize my error.

      > As I said, IME should be off in Normal mode, unless you explicitly typed
      > someting to enable it. And then going in/out of Insert mode should
      > disable it as well.

      We're not talking about the default here, we're talking about entering
      IME mode: it's not useful, and it'd be nice if toggling the IME in
      normal mode left the IME off and just toggled iminsert for the next time
      insert mode is entered.

      Also, since most of us use "i" to enter insert mode, we can't simply
      enter insert mode to turn the IME off: hitting i brings up hiragana
      "い". (Yeah, I can hit the actual insert key, but I'm more likely to
      stumble for a moment and hit ^I to toggle the IME back off.)

      Anyway, the whole "don't toggle the IME in normal mode" is minor (to me).
      It doesn't happen to me very often, it'd just be a niceity; the iminsert
      default is far more important. Alex, if you want to argue for it (and
      code it), feel free. :)

      --
      Glenn Maynard
    • Glenn Maynard
      ... An incomplete list: Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ Ǘ ǘ Ǚ ǚ Ǜ ǜ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ ΢ Σ Τ Υ Φ Χ Ψ Ω α β γ δ
      Message 2 of 12 , Jun 4, 2002
      • 0 Attachment
        On Tue, Jun 04, 2002 at 03:11:09PM -0400, Glenn Maynard wrote:
        > > It would be good to avoid the display to be messed up. If just this one
        > > character isn't displayed correctly that's not much of a problem (leave
        > > out half of the pixel columns or just show one half?).
        >
        > It's at least five characters: U+25CF, U+2018, U+2019, U+201C, U+201D.
        > I'm considering throwing together a program to see if there are others.

        An incomplete list:

        Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ Ǘ ǘ Ǚ ǚ Ǜ ǜ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ ΢ Σ Τ
        Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω А Б В Г Д Е Ж
        З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к
        л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ Ⅻ Ⅼ Ⅽ Ⅾ
        Ⅿ ⅰ ⅱ ⅲ ⅳ ⅴ ⅵ ⅶ ⅷ ⅸ ⅹ ⅺ ⅻ ⅼ ⅽ ⅾ ⅿ ↀ ↁ ↂ ← ↑ → ↓ ⇒ ⇔ ∀ ∂ ∃ ∇ ∈ ∋ ∑ √ ∝ ∞
        ∟ ∠ ∥ ∧ ∨ ∩ ∪ ∫ ∬ ∮ ∴ ∵ ∽ ≒ ≠ ≡ ≦ ≧ ≪ ≫ ⊂ ⊃ ⊆ ⊇ ⊥ ⊿ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩
        ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ ⒈ ⒉ ⒊ ⒋ ⒌ ⒍
        ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ ⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱
        ⒲ ⒳ ⒴ ⒵ Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ
        ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ⓪ ─ ━ │ ┃ ┌ ┏ ┐ ┓ └ ┗ ┘ ┛ ├ ┝ ┠
        ┣ ┤ ┥ ┨ ┫ ┬ ┯ ┰ ┳ ┴ ┷ ┸ ┻ ┼ ┿ ╂ ╋ ■ □ ▲ △ ▼ ▽ ◆ ◇ ○ ◎ ● ◯ ☀ ☁ ☂ ☃ ☄ ★ ☆
        ☇ ☈ ☉ ☊ ☋ ☌ ☍ ☎ ☏ ☐ ☑ ☒ ☓ ☚ ☛ ☜ ☝ ☞ ☟ ☠ ☡ ☢ ☣ ☤ ☥ ☦ ☧ ☨ ☩ ☪ ☫ ☬ ☭ ☮ ☯ ☰
        ☱ ☲ ☳ ☴ ☵ ☶ ☷ ☸ ☽ ☾ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇ ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓ ♔ ♕ ♖ ♗ ♘
        ♙ ♚ ♛ ♜ ♝ ♞ ♟ ♨ ♪ ♭ ♯ ✁ ✂ ✃ ✄ ✅ ✆ ✇ ✈ ✉ ✌ ✍ ✎ ✏ ✐ ✑ ✒ ✓ ✔ ✕ ✖ ✗ ✘ ✙ ✚ ✛
        ✜ ✝ ✞ ✟ ✠ ✡ ✢ ✣ ✤ ✥ ✦ ✧ ✨ ✩ ✪ ✫ ✬ ✭ ✮ ✯ ✰ ✱ ✲ ✳ ✴ ✵ ✶ ✷ ✸ ✹ ✺ ✻ ✼ ✽ ✾ ✿
        ❀ ❁ ❂ ❃ ❄ ❅ ❆ ❇ ❈ ❉ ❊ ❋ ❌ ❍ ❎ ❏ ❐ ❑ ❒

        Putty renders these half-width. That generally looks bad, but is almost
        always better than just rendering the left half of the glyph. It's easy
        to do; create another font with half the normal width, so wide charcters
        end up normal width.

        This doesn't work for quotes. My patch to Putty to fix this (and, as a
        nice bonus, the backslash in Japanese fonts) is working; I'm caching the
        characters in HBITMAPs ahead of time, so it's a lot faster now. This
        fix are font-specific. (I might be able to devise a test to generalize
        the quote fix.)

        Do you want me to try to port this to Vim?

        For those curious, http://zewt.org/~glenn/backslash.jpg contains a
        screenshot of the results: single-width Unicode quotes and a repaired
        backslash in a Japanese font, along with the above characters rendered
        half-width.

        --
        Glenn Maynard
      • Bram Moolenaar
        ... [..] Phew, that s a lot. ... Sounds like a good idea. Does the same trick also work to turn a proportionally spaced font into fixed-width? That s an item
        Message 3 of 12 , Jun 5, 2002
        • 0 Attachment
          Glenn Maynard wrote:

          > On Tue, Jun 04, 2002 at 03:11:09PM -0400, Glenn Maynard wrote:
          > > > It would be good to avoid the display to be messed up. If just this one
          > > > character isn't displayed correctly that's not much of a problem (leave
          > > > out half of the pixel columns or just show one half?).
          > >
          > > It's at least five characters: U+25CF, U+2018, U+2019, U+201C, U+201D.
          > > I'm considering throwing together a program to see if there are others.
          >
          > An incomplete list:
          >
          > Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ
          [..]

          Phew, that's a lot.

          > Putty renders these half-width. That generally looks bad, but is almost
          > always better than just rendering the left half of the glyph. It's easy
          > to do; create another font with half the normal width, so wide charcters
          > end up normal width.
          >
          > This doesn't work for quotes. My patch to Putty to fix this (and, as a
          > nice bonus, the backslash in Japanese fonts) is working; I'm caching the
          > characters in HBITMAPs ahead of time, so it's a lot faster now. This
          > fix are font-specific. (I might be able to devise a test to generalize
          > the quote fix.)
          >
          > Do you want me to try to port this to Vim?

          Sounds like a good idea. Does the same trick also work to turn a
          proportionally spaced font into fixed-width? That's an item on the todo
          list, since there aren't that many fixed-width fonts available. Might
          keep that in mind when writing the code (doesn't need to be implemented
          right away).

          --
          hundred-and-one symptoms of being an internet addict:
          93. New mail alarm on your palmtop annoys other churchgoers.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
          \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
          \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
        • Glenn Maynard
          ... I think it d use too much memory. (I have a different idea, using the width array parameter of the font rendering function.) I ll keep it in mind,
          Message 4 of 12 , Jun 5, 2002
          • 0 Attachment
            On Wed, Jun 05, 2002 at 10:32:28AM +0200, Bram Moolenaar wrote:
            > Sounds like a good idea. Does the same trick also work to turn a
            > proportionally spaced font into fixed-width? That's an item on the todo
            > list, since there aren't that many fixed-width fonts available. Might
            > keep that in mind when writing the code (doesn't need to be implemented
            > right away).

            I think it'd use too much memory. (I have a different idea, using the
            width array parameter of the font rendering function.) I'll keep it in
            mind, though.

            --
            Glenn Maynard
          • alexandre.elias@mail.mcgill.ca
            ... Yeah, I ll look into it and try to come up with a patch when I have the time. From what I ve seen of the code, intercepting and killing the IME in
            Message 5 of 12 , Jun 5, 2002
            • 0 Attachment
              On Tue, Jun 04, 2002 at 05:41:36PM -0400, Glenn Maynard wrote:
              > Anyway, the whole "don't toggle the IME in normal mode" is minor (to me).
              > It doesn't happen to me very often, it'd just be a niceity; the iminsert
              > default is far more important. Alex, if you want to argue for it (and
              > code it), feel free. :)

              Yeah, I'll look into it and try to come up with a patch when I have the
              time. From what I've seen of the code, intercepting and killing the IME
              in normal/visual mode shouldn't be very hard.

              This behavior is obviously desirable with the Windows IME, so IMHO it
              isn't necessary to add a new option. It's extremely silly to map a
              Japanese character to a vim command in Windows: in order to use it,
              you'd have to press alt-~ (IME enable key), type the character, press
              enter to confirm, and then press alt-~ again to disable the IME. It'll
              never happen. And the Windows IME support seems almost completely
              separate from the X support, so any change I would make wouldn't bother
              X users.

              Sounds like you guys are sorting out all of the other issues :). Thanks
              for looking into it.


              Alex
            Your message has been successfully submitted and would be delivered to recipients shortly.