move to a specific place within the text on the screen?
There are several ways you can do this. You can use the arrow keys,
but it's more efficient to keep your hands in the standard position
and use the commands C-p, C-b, C-f, and C-n. These characters
are equivalent to the four arrow keys, like this:
Previous line, C-p
:
:
Backward, C-b .... Current cursor position .... Forward, C-f
:
:
Next line, C-n
Here is a summary of simple cursor-moving operations, including the
word and sentence moving commands:
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line
C-e Move to end of line
M-a Move back to beginning of sentence
M-e Move forward to end of sentence
If Emacs stops responding to your commands, you can stop it safely by
typing C-g. You can use C-g to stop a command which is taking too
long to execute.
>> Type C-h k C-f. -- open a new window (like vim split)
See how this window shrinks, while a new one appears
to display documentation on the C-f command.
as well. Here is a summary of the delete operations:
<DEL> Delete the character just before the cursor
C-d Delete the next character after the cursor
M-<DEL> Kill the word immediately before the cursor
M-d Kill the next word after the cursor
C-k Kill from the cursor position to end of line
M-k Kill to the end of the current sentence
Undoing Changes
- C-/
- Undo one entry of the undo records—usually, one command worth
(
undo). - C-x u
- C-_
- The same.
>> Move the cursor to the beginning of a line which is not empty.
Then type C-k to kill the text on that line.
>> Type C-k a second time. You'll see that it kills the Newline
which follows that line.
This blog covers contents until line 453 of official tutorial
No comments:
Post a Comment