マウス対キーボード

(2011-03-24:しばらく編集できなそうなので、とっかかりの段階で公開)

UNIXユーザがPlan 9を使おうと思ったときに、おそらくもっともフラストレーションを感じるのはマウス操作を多用しなければならないことだろう。マウス操作に対するもっとも多い不満は、カーソル移動、それが矢印キーであろうが(viなどのように)hjklキーであろうが、と比べて遅いということだ。これは本当ではない。マウス操作は遅いようにみえて、実は早いのである。

簡単にまとめると、カーソル操作ではその相互作用を考えるためにより大きな心の準備を必要とする。そして、どうやら時間の推移の知覚があいまいなようだ。何かに没頭して時計を見たときに驚いたことに心当たりがあるだろう。

The basic summary is cursoring around required a higher level of mental planning to organize the interaction, which apparently obscures the perception of the passage of time--think of being deeply engaged in something and being surprised when you look at a clock-- whereas the use of the mouse was done at a lower, mechanical level that left the mind free for higher things, such as complaining about the mouse.

よくある不満は手をキーボードからマウスに移動し、また戻すのには時間がかかり、タイピングが中断されるというものだ。これは本当であるが、あなたが考えているほどのものではない。特に数字キーパッドなしのキーボードを使っているならば、マウスとの距離は近いはずだ。キーパッドのあるなしに関わらず、マウスに探すまでもなく辿り着く。あなたの手は常にマウスから離れた定位置(ホームポジション)にあって、しばしば別の手でタイピングしながらマウス操作の準備をし、自動的にそちらに手が動く。

例えば、すべての行の先頭からタブを削除することを考えよう。viで"^xjxjxjxjxjxjxjxjxjxjxjxjxj"とキーボードをタイプするよりもキマウス操作が遅いというのは本当だ。しかし、その時点では、単に実際に編集するだけではなく(ループを手動で展開することで)そのエディタをプログラミングしている。

マウスを適切に加速さたとき、私たちの多くはより早く、かつよく簡単に問題の行をハイライトし、acmeであれば Edit s/^//gと入力して実行できることがわかる。samのコマンドウィンドウであれば s/^//g と入力するだけだ。
これがacmeの一般的な操作である。
acmeは二つのシェルスクリプトを提供している。
ウィンドウのタグに |unind と |ind と書いておいて、必要なときにそれらをクリックできる。

When the mouse is properly accelerated, many of us find that it's faster and easier to highlight the lines in question and then type and execute Edit s/^//g in acme or just type s/^//g in sam's command window. This is such a common operation that acme provides two shell scripts so you can leave |unind and |ind in the tag of your window and click on them whenever you want.

Notice the difference between acme or sam and (say) vi in running editor commands like search and replace. In acme you can just highlight the section you want, type the command, and you're done. In vi, you have to cursor to one end, mark it, cursor to the other end, and finally type the command. The cursoring takes much longer than the mouse. Time yourself.

In the experience of many Plan 9 users, using the mouse in Plan 9 for an extended period of time and then going back to using vi in Unix highlights the amount of time you spend watching the screen as you cursor around with hjkl. Having broken out of the hypnosis that Tog describes, I just get frustrated beyond belief. Yes, I am watching the cursor move so I should be occupied, but all I can think is ``damnit, if I could just click where I want to go I'd be there by now.''

Another point in favor of the mouse is that it is more expressive. Notice how the scroll bars work in the Plan 9 text buffers: left or right clicking to scroll moves the window proportionally to where you are in the scroll bar. It would be much harder to do this in a cursor-based system. Cutting and pasting in acme and rio via mouse chording is much faster than the equivalent in cursor-based systems, especially if you are moving blocks that aren't line-aligned. Time yourself.

It's important to have a good mouse, of course. It needs three real buttons, not two button with an intelliwheel in the middle. Plan 9 makes too much use of the middle button for the wheel to suffice. You'll just get RSI in whatever finger you use to click the wheel. Logitech makes good three-button mice. Most people seem to prefer the triangle-shaped ones over the oval ones. They used to sell for $50 apiece. Now you can usually find them for $5-$10 on Ebay.

The most important point is that you need to try using the mouse for a week or two before you complain about it. You'll probably end up agreeing with us.

You feel more efficient using emacs et al. because you're always doing higher level cognition, while acme and sam might feel slower since you're acting instinctually but you're actually moving faster.

検索文字列を間違えたとき(emacsであればctl-Sとctl-Rを使う)、間違いを訂正するのには骨が折れる。acmeの"Look"コマンドは、タグを編集して、検索を再実行するだけである。

注意:ここは新規ユーザに向けた情報ページであって、宗教戦争の場じゃない。もしこの問題について議論したいのなら、この文書をどうにかする代わりに議論用のページを作ってちょうだい。よろしく。

このページはさらなるクリーンナップが必要なので、ご自由にどうぞ。

オリジナル:http://plan9.bell-labs.com/wiki/plan9/mouse_vs._keyboard/index.html