Vim Advent Calendar 2012の345日目(2013-11-10)の記事です。
普通のWindowsアプリにおいて、擬似的にViエディタのNormal mode編集操作を使えるようにするIMEを作りました。
| #!/bin/sh | |
| GH_TOKEN=$1 | |
| UPLOAD_FILE=$2 | |
| GH_USER_NAME=$3 | |
| GH_REPO_NAME=$4 | |
| VERSION=$5 | |
| if [ $# -ne 5 ]; then | |
| echo "Invalid arguments." |
Vim Advent Calendar 2012の345日目(2013-11-10)の記事です。
普通のWindowsアプリにおいて、擬似的にViエディタのNormal mode編集操作を使えるようにするIMEを作りました。
AquaSKK を素の iTerm2 で使うと、IM 状態を変更するための "C-j" や "l" がそのまま入力されてしまって不便という問題があり、 以下のあたりでその問題を直すパッチを作ってくださった方がおりました。
僕も 1.0.0 が出たころに上記パッチを当てた iTerm2 をずっと使ってました。
| diff -r 92c9748e0ccb src/config.h.in | |
| --- a/src/config.h.in Sun Oct 06 17:46:56 2013 +0200 | |
| +++ b/src/config.h.in Sun Oct 13 23:11:37 2013 +0200 | |
| @@ -442,3 +442,6 @@ | |
| /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/ | |
| #undef FEAT_CYGWIN_WIN32_CLIPBOARD | |
| + | |
| +/* Define if we have AvailabilityMacros.h on Mac OS X */ | |
| +#undef HAVE_AVAILABILITYMACROS_H |
| 7[?69h[19;40s8[1;1H[2J[2;1H12345678901234567890 | |
| #[3;30Haaa | |
| %[5;1H************************************************************** | |
| bbb | |
| [8;19H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7[r[s[?69l8 | |
| VT525's result as follows. | |
| 12345678901234567890 | |
| # aaa |
| ;;; Copyright (c) 2013 Yoshinori Kohyama. Distributed under the BSD 3-Clause License. | |
| (ns puyo | |
| (:require [clojure.test :refer (with-test run-tests are)] | |
| [clojure.set :refer (union)] | |
| [clojure.string :as string])) | |
| (with-test | |
| (defn- fall-one [b s] | |
| (->> (reverse b) | |
| (apply map vector) |
| [1;1H[2J7[?69h[20;70s8[1GIRM:[10G01234567890[30G#####[72Gabcdefgh[4h[75GTEST[15GTEST[60G01234567890[65GTEST[4l7[s[?69l8 | |
| IRM-OK: 01234TEST567890 ##### 01234TEST56 abcTESTde | |
| 7[?69h[20;70s8[1GICH:[10G01234567890[30G#####[72Gabcdefgh[75G[4@TEST[15G[4@TEST[60G01234567890[65G[4@TEST7[s[?69l8 | |
| ICH-OK: 01234TEST90 ##### 01234TEST56 abcTESTh | |
| 7[?69h[20;70s8[1GDCH:[10G01234567890[30G#####[72Gabcdefgh[75G[4P[15G[4P[60G01234567890[65G[4P7[s[?69l8 | |
| DCH-OK: 01234567890 ##### 0123490 abcdefgh | |
| [1GECH:[10G#######################################################################7[?69h[20;70s8[15G[10X[68G[5X[75G[3X7[s[?69l8 | |
| ECH-OK: ##### ########################################### ## ### |
| --- screen.c.orig 2013-06-15 17:29:09.000000000 +0900 | |
| +++ screen.c 2013-06-15 17:45:44.000000000 +0900 | |
| @@ -9020,6 +9020,7 @@ | |
| int j; | |
| unsigned temp; | |
| int cursor_row; | |
| + int cursor_col = 0; | |
| int type; | |
| int result_empty; | |
| int can_ce = can_clear(T_CE); |
| --- cursor.c.orig 2012-06-04 04:57:47.000000000 +0900 | |
| +++ cursor.c 2013-06-06 19:35:14.000000000 +0900 | |
| @@ -265,19 +265,19 @@ | |
| void | |
| CarriageReturn(XtermWidget xw) | |
| { | |
| TScreen *screen = TScreenOf(xw); | |
| int left = ScrnLeftMargin(xw); | |
| int col; | |
| brew install cmigemo | |
| mkdir -p ~/.vim/bundle/manual/migemo/plugin | |
| cd ~/.vim/bundle/manual/migemo/plugin | |
| curl -L -O https://raw.github.com/koron/cmigemo/master/tools/migemo.vim | |
| vi ~/.vimrc | |
| NeoBundle 'migemo', {'type' : 'nosync', 'base' : '~/.vim/bundle/manual'} |