g*******g 发帖数: 45 | 1 Dear all,
I want my souce code displayed like this in EMACS:
001 main()
002 {
003 int a;
004 }
The line numbers can be added automatically to the left of each line. Can
EMACS do that??? |
b*****e 发帖数: 474 | 2 en, 这个比较狠, emacs 看来是不行的了.
【在 g*******g 的大作中提到】 : Dear all, : I want my souce code displayed like this in EMACS: : 001 main() : 002 { : 003 int a; : 004 } : The line numbers can be added automatically to the left of each line. Can : EMACS do that???
|
l***s 发帖数: 11 | 3 I know there are a lisp that can display number like this format: |
g*******g 发帖数: 45 | 4 The line numbers can be displayed in the left margin of each line. That's all
I want, no matter what the format is. In my original post I just gave an
example about that. Maybe it confused you a little.
So can you tell me your methods to do that?
【在 l***s 的大作中提到】 : I know there are a lisp that can display number like this format:
|
l***s 发帖数: 11 | 5 I don't know which version of your emacs,
but most recommended way is to add following line into your .emacs file
(column-number-mode t)
and restart your emacs .
【在 g*******g 的大作中提到】 : The line numbers can be displayed in the left margin of each line. That's all : I want, no matter what the format is. In my original post I just gave an : example about that. Maybe it confused you a little. : So can you tell me your methods to do that?
|
g*******g 发帖数: 45 | 6 Seems doesn't work for my emacs. BTW, where can you see the version number?
all
line.
【在 l***s 的大作中提到】 : I don't know which version of your emacs, : but most recommended way is to add following line into your .emacs file : (column-number-mode t) : and restart your emacs .
|
N*********r 发帖数: 40 | 7 this just set the column number display on your status line.
【在 l***s 的大作中提到】 : I don't know which version of your emacs, : but most recommended way is to add following line into your .emacs file : (column-number-mode t) : and restart your emacs .
|
l***s 发帖数: 11 | 8 of course,but I think it's enough.
If you still want to display line number.
here is a el file(wb-line-number.el). it would satisfy what you need.
Add this file (byte-compiling it is recommended) to your load-path.
Then add these set of lines to your config:
(set-scroll-bar-mode nil) ; no scroll bar, even in x-window system
(recommended)
(require 'wb-line-number)
(wb-line-number-toggle)
======================================================================
;;; wb-line-number.el --- window-base
【在 N*********r 的大作中提到】 : this just set the column number display on your status line.
|