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))))
精彩评论