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

8028Re: MacVim inline patch

Expand Messages
  • Ben Schmidt
    Jun 13, 2008
    • 0 Attachment
      Andrew Watts wrote:
      > On Jun 13, 4:09 pm, Nico Weber <nicolaswe...@...> wrote:
      >> Hi,
      >> my Google alert for "MacVim" sent me this link today:http://ozexp.blogspot.com/search/label/macvim
      >> does someone know what this patch does? Is there anyone here who
      >> understands Japanese? Google Translate does not really help.
      >> Are those patches that could be merged into mainline?
      >> Nico
      > As best I can translate the Japanese before the diff (今まで使っていたパッチがあたらなく
      > なってしまったので、微修正。), it says "Because today's patch wasn't successful, a
      > small amendment". No guarantees that I translated it right, but it
      > does make some degree of sense.
      > Andrew

      Yep. The final post is clearly just a revision of an earlier patch.

      I think it's the January 9 and 11 posts that explains what the patch is
      addressing/meant to do that we need.

      I think a better translation of "inline" is "input method." I think this
      patch is addressing two issues with the Japanese input method. Here's my
      guess at what the Japanese means: I'm just guessing from the Google

      > (I'm now using) Google Code project MacVim, using Cocoa, rather than
      > Carbon Vim on OS X - I mean, it's getting bugfixes, so great!, but I
      > chucked it away because it wasn't being actively developed.

      > There are two problems:
      > 1. Starting an insertion with the half-size Katakana Japanese input
      > method pop-up window seems to be a glitch/difficulty.
      > 2. Inputting text once you have: Ctrl-(Keydown) is being accepted as a
      > Vim command.

      I think what the author is basically saying is: 1. If you use the
      Japanese input method, its popup menu is too large, or ignores some
      'half size' setting when in MacVim, obscuring text just after where
      you're trying to insert. And 2. the input method uses Control keys and
      these can't be used in MacVim because they activate Vim commands rather
      than controlling the Japanese input mechanism.

      The author goes on to solve 2 in that patch with a dirty hack: if the
      user is using a non-Roman script, and it's their system script--i.e.
      they are running Japanese OS X and typing in Japanese--stop MacVim/Vim
      handling control keys, but pass them on to Cocoa for it to do as it
      likes with. I've made this DirtyHack.patch. You won't see its effects
      unless you're on a non-Roman OS X, but it's easy to understand what it
      does anyway.

      I think he says that solving the first issue will take hard work, so
      it's in progress...so...we look at the later entries...

      Here's my guess at Jan 11:

      > Starting insertions wasn't addressed in my hack because I couldn't:
      > needed to work!
      > I'm happy with this at the moment, so I'll finally get back to work.
      > I'll find time to address feedback when I get home.

      So, I think this is the author's take on solving his first issue. I've
      made this First.patch. I'm not sure whether it's meant to be applied
      instead of the dirty hack of as well as the dirty hack. I suspect you're
      meant to apply both--one to solve each issue. His final revision of this
      patch that applies to current sources is Final.patch.

      My feeling is that the dirty hack is indeed a dirty hack: it alters the
      behaviour of the program in a seriously compatibility-breaking way,
      rather than providing an option, or proper functionality for this. (What
      should happen, which was attempted in earlier versions, I think, or
      maybe in vim-cocoa or even Carbon Vim, is setting the input method to
      something of Roman script in normal-like modes, and the 'foreign' input
      method in insert-like modes. Part of this 'foreign' mode for Japanese
      could be ignoring Control keys. All this should be controlled via ':set
      iminsert=2' really: i.e. a feature really needs to be added to Vim such
      as +mac_im rather than X11 +xim feature or Win32 +multi_byte_ime and
      global-ime features/extensions. This is no small task, but it would be a
      great thing to do! Though you could argue that providing the dirty hack
      in the meantime would be useful for many users, as long as it's an
      option that is off by default!--perhaps this could be something in the
      preferences window since it would be handy for many/most/all Japanese
      users: ignore control key in insert mode or something like that.)

      It took quite a bit of effort to get those patches off the web and make
      them apply cleanly, but I've managed it. If you pull your git repo back
      to the dates of the patches, they apply OK. You can clearly see the
      effect of the final one if you compare the Katakana or Half-Width
      Katakana input methods with and without the patch. And, actually, I've
      just noticed you can see its effects in other scripts, too: whenever you
      type a dead key, it is displayed half size, i.e. when I type Björn's
      name using my Australian keyboard layout, to get the ö I type Option-U
      followed by O. After typing the Option-U, I see ¨, and with the patch,
      it's half the size it was before. In Roman languages, this is no big
      deal, but in Japanese you build up a whole line of text before inserting
      it this way, so it obscures more than just one character, which I guess
      is the issue. It may be a font issue, too, of course; maybe with a
      Japanese font or with the default MacVim font (I use Lucida Sans
      Typewriter) things are actually the wrong size--for me, the 'dead' bits
      appear the same size as the text in the buffer without the patch, and
      half-size with it; but maybe using a different font they appear
      double-size and correct size respectively.

      As for the suitability of the code for this part, I can't comment. But
      I expect Björn can! If included, I definitely think it should be some
      option that can be turned off, as I prefer to have my dead keys show up
      the correct size! So...maybe another preference!

      Perhaps we should try to get in touch with the author to clarify the
      issues and provide the best solution.




      google code project published in the MacVim, looks cocoa, carbon vim than OS X -
      I mean, are being refined so great, but I
      Line around the fire because they were not concerned about it regularly. . . . .

      The problem is, two of the
      1. When you enter a new line at the half-size pop-up window seems to me a bias in
      the process.
      2. Line input when it is, Ctrl-(Keydown) is being accepted as a command of vim.

      1 of the poor Oh, and just barely tolerable, but two people. . . . .
      When you enter IM Ctrl-(p, i), Ctrl-(n, o) expansion and conversion segment,
      usually the tab when I want to move as he is a fatal problem.

      That of the two to resolve a simple hack to him.
      Actually, a line input, but rather a pop-up window, but I want to draw the line,
      It will take good hands, so in the meantime pending.

      MacVim project page is here. http://code.google.com/p/macvim/
      Is it like patches.


      Opens is not tolerated because it did not, in my hack out of necessity. Good time
      to make a living. . . . .
      Incidentally, IM on state trash is visible on screen and bug fix.

      I feel comfortable right now. Finally get back to core business.
      Find time to brush up on the feedback I get home.
      Incidentally,睨めcode and it'll go strainer, 9, I wrote a patch is not the
      greatest thing was discovered. . . . . orz

      JAN 9 - ORIGINAL

      google code project で公開されている MacVim,見た目が cocoa, carbon vim に比べて
      OS X 的

      1. インライン入力時に新たに開かれるポップアップウィンドウがどうも半角処理されてい
      2. インライン入力時でも,Ctrl-{Keydown} が vim のコマンドとして受け付けられてしまう.

      1 の方は,まぁ見にくいというだけでなんとか耐えられるけど,2の方は...
      IM入力時は Ctrl-{p,i},Ctrl-{n,o} で変換文節の伸縮,通常時は tab 移動とかをしたい


      MacVim プロジェクトのページは,ここ.http://code.google.com/p/macvim/

      JAN 11 - ORIGINAL



      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 17 messages in this topic