emacsのバッファ名を賢く付ける方法を教えてください。


例えばrailsの2つのプロジェクトのroutes.rbを編集する場合、1つ目のバッファ名がroutes.rb、2つめがroutes.rb<2>になりますが、これを1つ目を"routes.rb<proj1>"に、2つめを"routes.rb<proj2>"と自動的に設定することはできないでしょうか。

よろしくおねがいします。

回答の条件
  • 1人2回まで
  • 登録:
  • 終了:2007/04/29 06:05:02
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

回答1件)

id:Bookmarker No.1

回答回数191ベストアンサー獲得回数34

ポイント60pt

uniquify.el を使ってはどうでしょうか。

(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
Documentation:
*If non-nil, buffer names are uniquified with parts of directory name.
The value determines the buffer name style and is one of `forward',
`reverse', `post-forward' (the default), or `post-forward-angle-brackets'.
For example, files `/foo/bar/mumble/name' and `/baz/quux/mumble/name'
would have the following buffer names in the various styles:
  forward        bar/mumble/name  quux/mumble/name
  reverse        name\mumble\bar  name\mumble\quux
  post-forward   name|bar/mumble  name|quux/mumble
  post-forward-angle-brackets   name<bar/mumble>  name<quux/mumble>
  nil            name  name<2>
id:urekat

これです!!!!

http://d.hatena.ne.jp/holidays-l/20060923/p1

ありがとうございます!!

ちょうべんり!!

2007/04/22 08:01:01

コメントはまだありません

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません