QUICK KEYS IN EMACS

By default, there are two text editors installed on most Linux systems: vi and Emacs. Today we'll focus on some of the common keystrokes in Emacs, in order to help you quickly modify a file.

Type this syntax to edit a file with Emacs:

# emacs [filename]

This will get you into the text-editing screen. You can use the arrow keys to move around in the file, as you would for most text editors. You can use the [Page Up], [Page Down], [Home], and [End] keys for their respective purposes. There are also certain keystrokes you can use to navigate to text in the file, which include:

* [ESC]f to move forward one word

* [ESC]b to move backward one word

* [ESC]a to move to the beginning of a line press

* [ESC]e to move to the end of a line press

[CTRL]k to delete text from the cursor to the end of the line (This keystroke also stores deleted text in a buffer.)

[CTRL]y to paste the deleted text (known as the "yank" command)

Here are two Emacs sequences:

* [CTRL]x, [CTRL]s to save a file

* [CTRL]x, [CTRL]c to exit Emacs