What is Emacs?
Emacs is an acronym meaning Editor Macros(EMACS).
Emacs is an extensible, customizable, self-documenting, real-time display editor.
The original EMACS was written in 1976 by David A. Moon and Guy L. Steele Jr. as a set of Editor MACroS for the TECO editor.
Who is Richard Stallman?
Richard Stallman created the most popular, and most ported, version of Emacs called GNU Emacs, which was created for the GNU Project.
How to open and save files
To Open a file within emacs type.
Ctrl-x Ctrl-f [file]
To Save a file within emacs type.
Ctrl-x Ctrl-s
What is a Buffer and how to switch from one to the other?
Buffers in Emacs editing are objects that have distinct names and hold text that can be edited.
Buffers are used to hold the contents of files that are being visited; there may also be buffers that are not visiting files. Although several buffers normally exist, only one buffer is designated the current buffer at any time. Most editing commands act on the contents of the current buffer. Each buffer, including the current buffer, may or may not be displayed in any windows.
How to switch to between Buffers
- when the buffers names are not known
Ctrl-x b
- to list all the buffers
ctrl-x B
How to use the mark and the point to set the region?
You set the mark at one end of a text, and move point to the other end. The text between point and the mark is called the region.
To set mark on a text type
Ctrl-SPC(Set-mark-command)
How to cut and paste lines and regions.
- To cut the text, type
Ctrl-w
- To copy the text, type
Alt-w
- To paste the text, type
Ctrl-y
How to search forward and backward.
Search Forward
Ctrl-s
Search Backward
Ctrl-r
How to invoke commands by name.
To invoke a command by its full name, type
M-x(Alt-x)
, then the name of the command, and finally hit RETURN.
How to undo.
To undo type any of the three below
Ctrl-x u
# OR
Ctrl-/
# OR
Ctrl-_
How to cancel half-entered commands
To get rid of a partially typed command
Ctrl-g
How to quit Emacs
When you want to leave Emacs for a short time, type
Ctrl-z
and Emacs will be suspended.
To get back into Emacs, type
%emacs
at the shell prompt.
To quit Emacs permanently, type
Ctrl-x Ctrl-c.
Top comments (0)