开发者

ido-mode distinguish dired-mode buffer names

does anyone know of a good way to distinguish dired-mode buffer names from other types of buffers in the minibuffer while using ido-mode? For instance... s开发者_StackOverflowhowing a forward-slash at end of a dired-mode buffer name?


You could simply change the dired-mode buffers to always have /s at the end of their names. This code does that.

(add-hook 'dired-mode-hook 'ensure-buffer-name-ends-in-slash)
(defun ensure-buffer-name-ends-in-slash ()
  "change buffer name to end with slash"
  (let ((name (buffer-name)))
    (if (not (string-match "/$" name))
        (rename-buffer (concat name "/") t))))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜