Monday, September 13, 2010

Misc UI settings

(fset 'yes-or-no-p 'y-or-n-p)

;; talk to the main x clipboard. A total clusterf*ck of over engineering.
(require 'xclip)

;; Abbreviations
(setq abbrev-file-name "~/.emacs.d/.abbrev_defs")

;; Fast buffer and refile targets with fuzzy completion.
(require 'ido)

;; Show column mode in the mode line
(column-number-mode t)

;; An alternative for listing buffers.
;; Hardly use it now with IDO mode.
(require 'ibuffer)
(defalias 'list-buffers 'ibuffer)

;; Group the iBuffer contents.
(setq ibuffer-saved-filter-groups
(quote (("default"
("Org" ;; all org-related buffers
(mode . org-mode))
(or ;; mail-related buffers
(mode . message-mode)
(mode . mail-mode)
;; etc.; all your mail related modes
(filename . "src/myproject1/"))
(filename . "src/myproject2/"))
("Programming" ;; prog stuff not already in MyProjectX
(mode . c-mode)
(mode . perl-mode)
(mode . python-mode)
(mode . emacs-lisp-mode)
;; etc
("ERC" (mode . erc-mode))))))

(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-switch-to-saved-filter-groups "default")))

;; Show vertical position relative in the mode line
(if (require 'sml-modeline nil 'noerror)
(sml-mode 1)
(scroll-bar-mode -1))
(scroll-bar-mode 1)
(set-scroll-bar-mode 'right))

No comments:

Post a Comment