📜 ⬆️ ⬇️

7 Basic Navigation Techniques in Emacs

In this article, we will look at 7 techniques for navigating through text in the Emacs program.
1. Proc string
2. Screen
3. Moving by words
4. Special
5. By paragraphs
6. Search
7. Moving from the command line

Designations used in the article:
  • Ca: Ctrl-a
  • Ma: Meta-a (If you do not have a Meta key (Alt), use the Esc key)
  • CMa: Ctrl-Meta-a

1. Line navigation
The following four commands will help you navigate within the lines.

Repeated execution
To heighten convenience, you can specify how many times to execute a command using a combination of Cu, for example, to move 10 lines down, type Cu 10 Cp

To move within the line, there are two more useful commands:

2. Go to the "screen"
The following three combinations will help you move directly to the "screen" of the text.

In Cv and Mv, you can use the Page Down and Page Up keys, respectively.

3. To the beginning / end of the file
The following two commands will help you go to the beginning or end of an open file.

4. Going by the words
Keyboard shortcuts to navigate by the words:

5. Transition by paragraphs

6. Search by text
To search by text, use the following keyboard shortcuts:

If you want to perform a search using a regular expression, use the following combinations:

7. Navigation from the command line
Enter $ emacs +N filename in the command line to go to the N-th line when opening a file, for example:
$ emacs +10 / etc / passwd
')
And now let's remember all the navigation commands and write briefly in one place:

Cp :
Cn :
Cf :
Cb :
Cu N *** : N ***
Ca :
Ce :
Cv : ( Page Down)
Mv : ( Page Up)
Cl : ()
M-< :
M-> :
Mf :
Mb :
Ma : .
Me : .
Cs : Cs, .
Cr : , Cs.
CMs : Cs , .
CMr : , CMs.
$ emacs +N file : N-

This text is a free translation of an article from thegeekstuff.com

Source: https://habr.com/ru/post/99237/


All Articles