電子タバコ「DTターボ」シリーズ 販売館

[emacs] 遂に anything に入門しました。

このエントリーを含むはてなブックマークはてなブックマーク - [emacs] 遂に anything に入門しました。 Share on Tumblr Googleブックマークに追加 Bookmark this on Delicious このエントリをつぶやくこのWebページのtweets FriendFeedで共有

タイトルの通りなのですが、遂にanything.elに入門してみました。
あちこちで「anything いいよ。anything。」って聞こえてたんですが、なかなかめんどくさくてやってませんでした。

もう初心者なんて言わせない、Anything で始まる Emacs 道。 – 日々、とんは語る。
このサイトが全てですが、とりあえず手順を書いておこうと思いますw

1、auto-install.elをインストール

anythingはなにやら複数の.elファイルで構成されているらしいので、
複数を一気にインストールするためのAutoInstallとやらをダウンロードして、load-pathの通った所に置く。byte-compileとかした方が幸せかも。

AutoInstallの設定。僕のはこんな感じ

(require 'auto-install)
(setq auto-install-directory "~/.elisp/auto-install/")
(auto-install-update-emacswiki-package-name t)
(auto-install-compatibility-setup)

auto-install-directoryの場所にload-pathを通すのも忘れずに。

(add-to-list 'load-path "~/.elisp/auto-install/")

2、anythingをインストール

M-x auto-install-batch RET anything RET

はい。あとは

C-c C-c

を何回か押せばインストールされちゃいます。

3、emacsを設定する

僕の設定はこんな感じ。M-x anything でも起動出来るけどうつのめんどくさいので、
M-lに設定してあります。

(require 'anything)
(require 'anything-config)
(require 'recentf)
(define-key global-map (kbd "M-l") 'anything)
(setq recentf-max-saved-items 3000)
(recentf-mode 1)
(setq anything-sources
      '(anything-c-source-buffers+
;        anything-c-source-colors
        anything-c-source-recentf
        anything-c-source-bookmarks
        anything-c-source-file-cache
        anything-c-source-man-pages
;        anything-c-source-emacs-variable-at-point
;        anything-c-source-emacs-function-at-point
        anything-c-source-file-name-history
;        anything-c-source-anything-grep-fallback
;        anything-c-source-anything-google-fallback
        anything-c-source-emacs-commands
        anything-c-source-emacs-functions
        anything-c-source-files-in-current-dir+
        ))


必要ないソースとかはコメントアウトしちゃってます(いつか必要になる時に思い出せるようにw)。

もう3日ぐらい使ってますが、かなりいい感じ。anything-c-source-recentf と、anything-c-source-buffers+ が秀逸すぎて素敵すぎる。

あと、auto-installでphp-completionが入れられるんだけど、それも今度BLOGでも書く。

Posted 土曜日, 2月 27th, 2010 under emacs.
blog comments powered by Disqus