Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Making Emacs to show line number Post 46874 by oombera on Wednesday 28th of January 2004 11:28:28 AM
Old 01-28-2004
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:
6.3.6 Quick reference for emacs

Cursor movement:

C-a beginning of line
C-e end of line
C-< top of document
C-> end of document
M-x goto-line Go to line
C-v page forward
M-v page backward

Deleting and moving text:

Backspace delete character before cursor
(subject to modification of .emacs)
C-d delete character under cursor
M-d delete word
C-k delete to end of line(s)
(restore with C-y)
C-SPC set mark
C-w delete from mark to cursor
(restore with C-y)

Search and replace:

C-s incremental search forward
C-r incremental search backward
C-% query replace
M-x replace-string <ENTER> <searchstr> <ENTER> <replstr>

Miscellaneous:

C-x u undo
C-x C-s save file
C-x C-f find file
C-x 2 2 windows
C-x 1 1 window
C-x o switch between windows
C-x b switch buffers
M-q reformat paragraph
C-x C-c quit

Useful customisable keys (configured using the provided .emacs file):

C-x g goto line
C-x c compile program (useful with C-x 2)
C-x C-u open Unix shell (useful with C-x 2)
C-x a repeat command
C-x m manual entry
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

emacs as a line editor

hello, I would like to use emacs as a line editor (I use emacs as editor). I try "set -o emacs" but I have nothing. Thank you for any help (5 Replies)
Discussion started by: annemar
5 Replies

2. Shell Programming and Scripting

making sure a command line paramter is a number

i need to make sure that a command line paramter is with in a certin set of numbers and i dont know how todo it with out checking individual numbers. if test $1 -eq (need something here) then echo hi fi like if i put individual numbers in there it works fine but how do i do a range (3 Replies)
Discussion started by: rcunn87
3 Replies

3. Shell Programming and Scripting

Show result only if number is greater then

Hello all Im trying to write one liner that will show me results only if the result of the expression is greater then 0 For example: I do : find . -name "*.dsp" | xargs grep -c SecurityHandler the result are : ./foo/blah/a.dsp:0 ./foo/blah1/b.dsp:1 ./foo/blah2/c.dsp:2... (1 Reply)
Discussion started by: umen
1 Replies

4. Programming

Emacs line indentation

Hi. I'm writing a document in Python, so indentation is crucial. I want to indent a whole section by exactly one tab. Any idea how to go about this? I'm using terminal emacs (no mouse input) Thanks for any help! (2 Replies)
Discussion started by: Rledley
2 Replies

5. Shell Programming and Scripting

Making script show command (e.g. copy) being executed and variable substitution?

When script is running you only see when some of the commands are not successfull. Is there a way to see which command are executed and to show the substitution of variables as every line is executed ? (3 Replies)
Discussion started by: gr0124
3 Replies

6. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

7. Shell Programming and Scripting

How to use command tail -f & show line number.

Hello Guys, I have created function which is as follow: tail -f filename |grep "Key word" output from this command 19-11-2011 21:09:15,234 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,286 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,523 - INFO... (5 Replies)
Discussion started by: ooilinlove
5 Replies

8. UNIX for Dummies Questions & Answers

How to use emacs? Also how to open existing emacs files with .cgi format?

Hi All, I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way.. How to use emacs editor? Also how to open existing emacs files with .cgi format? I have the following link :- http link i.e. url and path : /abc/xyz.dev/xyz/documents What... (7 Replies)
Discussion started by: swathi123
7 Replies

9. Shell Programming and Scripting

Show difference between two number

Hi, I would like to show the difference between two numbers. For example. input.txt 1 7 2 10 0 0 6 7 I would like a third field showing the difference between the numbers as below: ouput.txt 1 7 6 2 10 8 0 0 0 6 7 1 How do I do this? (4 Replies)
Discussion started by: general_lee
4 Replies
rcs-checkin(1)						      General Commands Manual						    rcs-checkin(1)

NAME
rcs-checkin - check files into RCS SYNOPSIS
rcs-checkin [FILE...] DESCRIPTION
rcs-checkin is a helper script for checking files into RCS. This program is distributed with GNU Emacs. This program converts files with an old Emacs-style version history for use with the Emacs 19 version control interface VC, which likes to use RCS as its back end. For each file to be processed, the script looks for Emacs version files related to it. These files are checked in as deltas, oldest first, so that the contents of the file itself becomes the latest revision in the master. The first line of each file is used as its description. The file itself is not deleted, as under VC with vc-keep-workfiles at its default of t, but all the version files are. If an argument file is already version-controlled under RCS, any version files are added to the list of deltas and deleted, and then the workfile is checked in again as the latest version. This is probably not quite what was wanted, and is the main reason VC doesn't simply call this to do checkins. In order to make it easier to use rcs-checkin *, files which are detectably either RCS masters (with names ending in ,v) or Emacs version files (with names containing ~) are ignored. OPTIONS
The program accepts no options. SEE ALSO
The Emacs version control interface is documented in the GNU Emacs manual, which you can read using Info, either from Emacs or as a standalone program. AUTHORS
rcs-checkin was originally written by Paul Eggert. It was revised for use with GNU Emacs VC by Eric S. Raymond. COPYING
Copyright (C) 2008, 2009 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. rcs-checkin(1)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy