Source

dotfiles / emacs.d / buffers.el

Full commit
;;; Make buffer names unique!
;; So instead of Makefile and Makefile<2>
;; you'll have Makefile/somedir and Makefile/otherdir
(require 'uniquify) 
;; setting: uniquify-buffer-name-style
;; Given 3 files 
;;   /home/foo/Makefile
;;   /home/bar/Makefile
;;   /opt/foo/Makefile
;; style 'forward means their buffer names would be:
;;   foo/Makefile
;;   bar/Makefile
;;   opt/foo/Makefile
;; style 'post-forward means:
;;   Makefile|foo
;;   Makefile|bar
;;   Makefile|opt/foo
;; style 'reverse means:
;;   Makefile\foo
;;   Makefile\bar
;;   Makefile\foo\opt
;; 
;; I think that reverse gives us the most sensible path first
(setq 
  uniquify-buffer-name-style 'reverse
  uniquify-separator ":")

;;; Ibuffer is an alternative to the normal buffer list
;;  which supports:
;;
;; Search all marked buffers
;;‘M-s a C-s’ - Do incremental search in the marked buffers.
;;‘M-s a C-M-s’ - Isearch for regexp in the marked buffers.
;;‘U’ - Replace by regexp in each of the marked buffers.
;;‘Q’ - Query replace in each of the marked buffers.
;;‘I’ - As above, with a regular expression.
;(global-set-key (kbd "C-x C-b") 'ibuffer)
;(autoload 'ibuffer "ibuffer" "List buffers." t)