100% found this document useful (1 vote)
382 views9 pages

Emacs Editor in Linux

Emacs is a powerful and customizable text editor available for Linux, Unix, and Windows. It can be run by typing "emacs" or "emacs filename.ext" at the command line. Emacs has both insert and command modes, with commands starting with Ctrl or Meta key combinations. Some common commands include Ctrl-x Ctrl-c to quit, Ctrl-x Ctrl-s to save and exit, and navigation commands like Ctrl-p/n to move between lines.

Uploaded by

Sazal Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
382 views9 pages

Emacs Editor in Linux

Emacs is a powerful and customizable text editor available for Linux, Unix, and Windows. It can be run by typing "emacs" or "emacs filename.ext" at the command line. Emacs has both insert and command modes, with commands starting with Ctrl or Meta key combinations. Some common commands include Ctrl-x Ctrl-c to quit, Ctrl-x Ctrl-s to save and exit, and navigation commands like Ctrl-p/n to move between lines.

Uploaded by

Sazal Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Emacs editor in linux

Definition

 Emacs is another editor available in UNIX. Like vi,emacs is a screen editor.unlike


vi,emacs is not an insertion mode editor, meaning that any character typed in emacs is
automatically inserted into the file,unless it includes a command prefix.

Emacs is a powerful programmable text editor.


It is available for Linux, Unix, and Windows.
To run Emacs, simple type
emacs
emacs test.cpp
HISTORY

 Emacs development began during


the 1970s at the MIT AI Lab,
whose PDP-6 and PDP-
10 computers used the Incompatible
Timesharing System (ITS) operating
system that featured a default line
editor known as Tape Editor and Emacs was started by Guy L. Steele
Corrector (TECO).  Jr. as a project to unify the many
divergent TECO command sets and
key bindings at MIT
WHY LEARN EMACS

 Emacs is good for programming


 Emacs is pervasive
 Emacs is free
 Emacs is powerful
 Emacs can increase productivity
HOW TO INSTALL THE EMACS
You can check if your Linux system has emacs installed by simply running the following command:
emacs
If the program is installed, the editor will start with the default welcome message. This was not the case in my CentOS
6.5 system:

[root@TestLinux ~]# -bash: emacs: command not found


-bash: -bash:: command not found

So I ran the following command to install the emacs packages:

[root@TestCentOS ~]# yum install emacs

In Ubuntu 12, I ran the following command to install emacs.

root@TestUbuntu:~# apt-get install emacs

In both cases, Linux will query the required package information from available mirrors or software libraries and ask
whether you would like to go ahead and install it. It will also give you an estimate of disk space required. Once you say
yes (with a single keystroke of “y”), all emacs packages and their dependencies will be downloaded and installed
THE EMACS SCREEN
Emacs is normally in insert mode.
Emacs also has a command mode.
All commands begin with either:
1. C (the Ctrl key)
• Hold down the Ctrl key while pressing the listed key.
2. M (meta = either Esc or Alt)
• Hold down the Alt key while pressing the listed key.
• Or press and release the Esc key and then press the listed key.
COMMAND OF THE EMACS EDITOR

C-x C-c Quit Emacs (without saving).


C-x C-s Exit Emacs (saving any changes).
C-x uUndo.
C-s Search.
C-g Quit current command.
C-k Kill from the cursor position to end
of line.
C-y Yank back (what was killed).
C-v move forward one screenful
M-v move backward one screenful
C-p move to previous line
C-n move to next line
C-b move backward a character
C-f move forward a character
C-a move to beginning of line
C-e move to end of line
M-< go to beginning of file
M-> go to end of file

You might also like