Line Numbers on Margin
Now you can show line numbers on the margin, a common feature in other editors. (Thanks to Markus Triska)
To toggle it in current buffer, type “Alt +x linum-mode ”. To toggle globally, type “Alt +x global-linum-mode ”. To set it permanetnly, put:
(global-linum-mode 1) ; always show line numbers
in your .emacs file.
---------------------------------
emacs23 自带了显示行号的功能, 在.emacs中加入以下两行就可以在左边显示行号了.(其中,format格式串,跟C语言中的格式差不多)