Mac OS X設定3日目

ぼちぼちすることもなくなって快適に使えるようになってきました.

バッテリーの儀式

バッテリーの寿命を少しでも長持ちさせるために.

  1. フル充電のまま最低2時間
  2. 電源アダプタ外す
  3. 警告出るまで放置し,警告出たら保存すべきものは保存
  4. 自動でスリープになるので5時間放置
  5. 電源アダプタ接続,フル充電

参考:Apple ポータブル:コンピュータのバッテリーを調整して最適な状態にする - Apple サポート
月イチペースで.iCalのカレンダーも配布されてる.ちなみに上記作業中に操作しててもOK.

システム環境設定

  • ExposeとSpaces
    • Spacesを有効にする

入力

どう考えても¥より\のが入力頻度高いので

Emacs

reftex-mode
  • 文献引用(\citeの補完)はC-c [
  • C-c (でlabelの設定,C-c )で\refの補完
  • .emacsに以下のように記述しておくとYaTeX起動時にreftex-mode
(add-hook 'yatex-mode-hook
          #'(lambda ()
              (reftex-mode 1)
              (define-key reftex-mode-map
                (concat YaTeX-prefix ">") 'YaTeX-comment-region)
              (define-key reftex-mode-map
                (concat YaTeX-prefix "<") 'YaTeX-uncomment-region)))
howm
(autoload 'howm-menu "howm-mode" "Hitori Otegaru Wiki Modoki" t)
(global-set-key "\C-c,," 'howm-menu)
(setq howm-menu-lang 'ja)
hatena-mode

ターミナルから

cd /Applications/Emacs.app/Contents/Resources/site-lisp
cvs -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hatena-mode login

パスワード聞かれるけどそのままreturnキー

cvs -z8 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hatena-mode co .

参考: http://d.hatena.ne.jp/hikigaeru/20040617#p1
これでhatena-modeがインストールされるがhatena-mode.elの修正が必要.

--- hatena-mode.el	28 Oct 2005 09:14:30 -0000	1.14
+++ hatena-mode.el	6 Jul 2007 10:29:21 -0000
@@ -338,7 +338,7 @@
     (call-process hatena-curl-command nil nil nil 
 		  "-k"  "-c" hatena-cookie
 		  "-x" hatena-proxy
-		  "-d" (concat "key=" hatena-usrid)
+		  "-d" (concat "name=" hatena-usrid)
 		  "-d" (concat "password=" password)
 		  "-d" (concat "autologin=1")
 		  "-d" (concat "mode=enter")

hatena-helper-mode.elをはてな記法を入力支援する hatenahelper-mode - おもてなしの空間からダウンロードしてきてsite-lispディレクトリにコピー.
screen-lines-mode.elをhttp://homepage1.nifty.com/bmonkey/emacs/からダウンロードしてきてsite-lispディレクトリにコピー.
ちなみにsite-lispディレクトリはCarbon EmacsならEmacsを起動してHelp => Carbon Emacs Package => Open Site-Lisp Directoryを選択するとファインダーで開ける.
hatena-modeとhatena-helper-mode,screen-lines-modeをインストールしたら.emacsを編集.

;; hatena-mode {{{2
;; screen-lines-mode
   (autoload 'screen-lines-mode "screen-lines"
             "Toggle Screen Lines minor mode for the current buffer." t)
   (autoload 'turn-on-screen-lines-mode "screen-lines"
             "Turn on Screen Lines minor mode for the current buffer." t)
   (autoload 'turn-off-screen-lines-mode "screen-lines"
             "Turn off Screen Lines minor mode for the current buffer." t)
;; hatena-mode and hatenahelper-mode
(load "hatena-mode")
(setq hatena-usrid "user id")
(add-hook 'hatena-mode-hook
          '(lambda ()
             (turn-on-screen-lines-mode) 
             (require 'hatenahelper-mode)
             (hatenahelper-mode 1)
             ))

user idの部分は自分のはてなidに置き換える.
参考:hatena-mode導入した - もうカツ丼でいいよな
色々用意する必要がなかったのでWindowsより簡単だった.

MultiClutch

マルチタッチの各動作にキーボードショートカットを割り当てられる.
http://wcrawford.org/2008/02/28/everytime-i-think-about-you-i-touch-my-cell/

  • Firefox
    • Swipe Down: ^I(進む)
    • Swipe Up: ^O(戻る)
    • Swipe Left: ^N(左のタブへ)
    • Swipe Right: ^P(右のタブへ)

※Vimperator用です