![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 05:29 AM |
| Appending line number to each line and getting total number of lines | chiru_h | Shell Programming and Scripting | 2 | 03-25-2008 07:19 AM |
| Show result only if number is greater then | umen | Shell Programming and Scripting | 1 | 12-05-2007 01:03 AM |
| making sure a command line paramter is a number | rcunn87 | Shell Programming and Scripting | 3 | 07-13-2006 07:36 AM |
| Need ls to show number of lines in each file | GMMike | UNIX for Dummies Questions & Answers | 1 | 11-19-2004 02:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Making Emacs to show line number
Hi all
How can I make Emacs to show the line numbers at the left or right as a default. This might help me to quickly jump to a given line. Thanks SS |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try putting this in your .emacs file:
(line-number-mode 1) |
|
#3
|
|||
|
|||
|
I tried that but it is not working. Actually, I do get line number on the mode line but I would like numbers at the left or right end of the buffer.
I have been suggested this http://www.emacswiki.org/cgi-bin/wiki.pl?LineNumbers but I didn't understand abc of it. Can you please have a look at it and let me know. SS |
|
#4
|
||||
|
||||
|
Sorry, I never even used emacs ( vi rules). Just searched for a possible solution to your problem to assist.
The code seems like a bit much for putting in line numbers but you might try it - seems to be the only thing to do if you really want the line numbers. And I have no clue of how you are suppose to use the program. I didn't find any 'set up' instructions. I did note the waste of cpu... Setnu is a mode that displays line numbers in Emacs buffers, much as the "set nu" command does under VI, hence the name. Setnu works under XEmacs and GNU Emacs. This package is best used on files with a few thousand lines at most, unless you have very fast hardware and are willing to waste it recalculating and redisplaying line numbers. The latest version of setnu is 1.06. |
|
#5
|
|||
|
|||
|
Ok, I know you are not emacs user, so if you have to go to some line in the middle of buffer, how do you go there quickly? I though if I knew line number, I would use move to line funct to go there.
SS |
|
#6
|
||||
|
||||
|
Even if you could display line numbers in emacs, how would you know which line you were trying to skip to.. just guess which one is approximately "in the middle of the buffer"? ... and is there even a command in emacs that allows you to skip to a specified line?
Maybe it'd be easier to search for a string than to skip to a line number... Take a look at this tutorial: http://www.doc.ic.ac.uk/~wjk/UnixInt...html#emacs-6-3 Quote:
|
|
#7
|
|||
|
|||
|
Yes, those are the keys that I am using though not all of them.
What I was looking is - if it numbers line of a file , then I can jump to a particular line immediately using go to line command ofcourse it will work good only for a page. how do you do this? SS |
|||
| Google The UNIX and Linux Forums |