Saturday, September 5, 2009

Some emacs tricks

As a Linux/Unix fan, I am very familiar with vi and use it for quick and simple text editing purposes. Over the years, however, I have been using emacs the most: I like its color coding and programming language-specific editing mode.

Emacs is well-known for its extensibility, so there are many ways to customize it to suit one's taste. In my experience, I have found the following settings convenient:
  • Highlight the current line with a background color (here "greenyellow")
    (require 'highlight-current-line)
    (highlight-current-line-on t)
    (highlight-current-line-set-bg-color "greenyellow")
  • Set transient mark mode on, so that selected text become more obvious
    (setq transient-mark-mode t)
  • Show line number and column number
    (setq line-number-mode t)
    (setq column-number-mode t)
There are many features in emacs that could be handy and I am always trying to learn more of it.

No comments:

Post a Comment

You are welcome to make a comment. Just remember to be specific and follow common-sense etiquette.