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

33vim 56 - Japanese version

Expand Messages
  • ASAI Kenichi
    Apr 3, 2000
      Dear Vim-Mac developpers,

      # I have just joined this mailing list.

      It seems that I succeeded in making Japanese version of Vim 5.6 on
      Macintosh. Here I would like to report what I did.


      - I compiled Vim 5.6 + patch 1-14 + macpatch 01 on MacOS J1-8.1 (not
      Japanese Language Kit) on PowerBook G3 using CodeWarrior Professional
      (educational) following the instruction described at:


      - The required changes are available at:

      http://www.is.s.u-tokyo.ac.jp/~asai/macvim/macvim.tar.gz, or
      http://www.is.s.u-tokyo.ac.jp/~asai/macvim/macvim.lzh, or
      the following eight diff files:

      I now describe these changes in detail.

      - os_mac.h, edit.c

      I supported Macintosh equivalent of +xim. Namely, when you go into
      insert mode, the Input Method is enabled, and when going back to
      command mode, it is disabled.

      Because I think only is_dbcs people want this function, it might be
      better to insert: "if (is_dbcs)" to each change in edit.c, or define a
      new compiler directive like MACINTOSH_IM_CONTROL.

      - feature.h

      I just turned #define MULTI_BYTE on.

      - gui_mac.c

      I changed gui_mch_draw_sting so that when the character on the cursor
      is multibyte, the size of cursor is doubled. Because this change is
      universal to all platforms (I think), the change could be made in
      gui.c, too. I actually did this at first, but since I do not
      comprehend all the platforms, I moved the changes into gui_mac.c. For
      your reference, I put my original change in gui.c at:


      - ex_docmd.c

      For this patch, I just posted it to vim-multibyte@.... Here is
      the description:

      When multibyte charcters are used in ex command such as

      set guifont=<font name using multibyte>

      and if the multibyte contains "|" (0x7c) in its trail byte, this "|"
      is mistakenly interpreted as the separation of ex commands.

      (The patches up to here are patches that seem to be ok. The patches
      from here on are required for me to use Japanese, but they are not
      very clean nor general. Thus, you should not incorporate them

      - multbyte.c

      I changed the IsLeadByte so that if MSB is on, it returns true.
      CodeWarrior does not seem to support mblen properly. (Even when we
      use Japanese, this is not always true, and better solution should be
      persued here.)

      - screen.c

      I needed a patch for handling non-printable characters when they are a
      lead byte. I hear that Japanese port of Windows GVIM does not need
      this change, which means that I might be able to find better solution
      to this.

      I also made a change on the ruler dispaly. When the cursor is on
      multibyte characters, the ruler shows 2 bytes as its character code.

      - charset.c

      I needed to change the required length for each character in chartab.
      This change is probably wrong, but without this change, character
      count for Japanese text goes wrong. Some thorough solution required.

      This is it. With these patches, I could somehow use Japanese on vim
      on macintosh (although it's far from perfect). I hope this helps the
      development of multibyte vim on Macintosh.

      Finally, several other things:

      - I would like to distribute the binary for this Japanese vim on my
      homepage, because there seems to be some people who actually want to
      use it. Would this be possible?

      - Do I need any statement on copyright? I do not need any copyright
      on the diff files I made, so please use it in anyway (but without any

      - I requested several things a few weeks ago (--enable-multibyte,
      --enable-fontset, --enable-langmap, --perlinterp, and
      --enable-xim-equivalent), but most of them are resolved now. So now,
      I would like to ask one thing: any way to launch application (like
      launch(filename) and launch_background(filename)). Since we have
      AppleScript, if we can launch an application, we can do wide variety
      of things. (Currently, I know nothing about inter-process
      communication on Macintosh...)


      Kenichi Asai


      Axel said:
      >I'm currently in Hamamatsu and have only my PowerBook with me. My plan is
      >to return to germany at the end of april and then I will work at the Mac
      >port again.

      Oops! What a coincidence. I was in Hamamatsu from March 20-22. I
      might have seen you there...
    • Show all 12 messages in this topic