Redian新闻
>
Display line number in EMACS??????
avatar
Display line number in EMACS??????# Unix - 噫吁兮,危乎高哉
g*g
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???
avatar
b*e
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???

avatar
l*s
3
I know there are a lisp that can display number like this format:
avatar
g*g
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:
avatar
l*s
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?

avatar
g*g
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 .

avatar
N*r
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 .

avatar
l*s
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.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。