###

alias hbin me

Cleanup The Emacs Mode Line

Look at the bottom of the Emacs frame, there is a distinctive line above the minibuffer, it’s mode-line. This displays various information about what is going on in the buffer, such as whether there are unsaved changes, the editing modes that are in use, the current line number, and so forth.

After installed several add-ons, you may find that the mode-line occupied by the minor-mode indicators. As follow:

Not all of the indicators are useful for me, even more, they (but not the minor mode) pollute the mode-line, so I want to save the limited spaces.

  • DIY

    First, you should add this function to your .emacs.

1
2
3
(defun hbin-remove-mm-lighter (mm)
  "Remove minor lighter from the mode line."
  (setcar (cdr (assq mm minor-mode-alist)) nil))

Then, customize the minor mode as follow:

1
2
3
4
(hbin-remove-mm-lighter 'autopair-mode)
(hbin-remove-mm-lighter 'textmate-mode)
(hbin-remove-mm-lighter 'eproject-mode)
(hbin-remove-mm-lighter 'whole-line-or-region-mode)
  • Diminish plugin

    diminish is a package that diminishes the amount of space taken on the mode line by the names of minor modes. After installed it handy, costomize as follow:

1
2
3
4
(eval-after-load "autopair" '(diminish 'autopair-mode))
(eval-after-load "textmate" '(diminish 'textmate-mode))
(eval-after-load "eproject" '(diminish 'eproject-mode))
(eval-after-load "whole-line-or-region" '(diminish 'whole-line-or-region-mode))

END!

Comments