Linuxを使う機会も多くなったのでWindowsで使うエディタも
emacsにしたいと思い、meadowやxyzzyも試してみましたが、
結局、NTEmacsを使ってみることにしました。
NTEmacsのインストールメモ前提
・Windows Vistaへのインストール
・インストールはできるだけ簡単に済ませたい。
・日本語はインラインで入力したい。
・Rubyのコードを書く用途にも使いたい。
ダウンロード
ココからたどって
http://ntemacsjp.sourceforge.jp/matsuan/IndexJp.htmlココから
http://sourceforge.jp/projects/ntemacsjp/releases/このファイルをダウンロード
emacs_22.2_bin_20080327.exe
ダウンロードしたファイルをダブルクリックで展開してコピー
例)
G:\emacs\22.2
addpm.exe実行
メニューにEmacsのアイコンが作成される。
環境変数設定
PATH設定
例)
G:\emacs\22.2
ホームディレクトリの設定
例)
HOME G:\home
タイムゾーンの設定
TZ JST-9
ホームディレクトリ作成
例)
G:\home
メニューに登録されたEmacsアイコンのプロパティを開き、
作業フォルダとしてホームディレクトリを指定
例)
G:\home
Rubyに付属しているEmacs Lisp ファイルをコピー
G:\ruby-1.8\shareにある.elファイル
ruby-mode.el
ruby-style.el
inf-ruby.el
rubydb2x.el
rubydb3x.el
ruby-electric.el (対応する括弧やendを自動補完するもの)
をロードパスの通っている
G:\emacs\site-lisp
にコピー
ついでにココから
http://www.emacswiki.org/cgi-bin/wiki/ruby-block.elruby-block.el (endに対応する行をハイライトするもの)
をダウンロードして同じく
G:\emacs\site-lisp
にコピー
更にECBもインストール
ココから
http://ecb.sourceforge.net/ecb-2.40.zip
をダウンロードして展開したものをフォルダごと
G:\elisp\ecb-2.40にコピー
次にECBを使うために必要なCEDETをココから
http://cedet.sourceforge.net/cedet-1.0pre6.tar.gz
をダウンロードして展開したものをフォルダごと
G:\elisp\cedet-1.0pre6にコピー
最後にホームディレクトリの.emacsファイルに以下の内容を追加
;; ruby-block
(require 'ruby-block)
(ruby-block-mode t)
(setq ruby-block-highlight-toggle t)
;; ECB
(setq load-path (cons (expand-file-name "~/elisp/ecb-2.40") load-path))
(load-file "~/elisp/cedet-1.0pre6/common/cedet.el")
(setq semantic-load-turn-useful-things-on t)
(require 'ecb)
(setq ecb-tip-of-the-day nil)
(setq ecb-windows-width 0.25)
(defun ecb-toggle ()
(interactive)
(if ecb-minor-mode
(ecb-deactivate)
(ecb-activate)))
(global-set-key [f2] 'ecb-toggle)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ecb-options-version "2.40"))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
とりあえずこれでO.K.
設定に不足があったら追記します。
参考)
http://itslab.csce.kyushu-u.ac.jp/~furukawa/tips/Section1/1.1/1.1.htmlhttp://www11.plala.or.jp/metameta/takuayu_papa/emacs1.htmlhttp://d.hatena.ne.jp/yuko1658/20071213/1197517201http://d.hatena.ne.jp/kazu-yamamoto/20080201/1201858978----------
入門GNU Emacs第3版
Emacs辞典
便利なツールEmacsらくらく入門