0% found this document useful (0 votes)
10 views

Emacs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Emacs

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

ALX LESSON

Emacs
Shell - Editor
TABLE OF CONTENTS

01 02
Overview Learning
topics Objectives

03 04
Quiz hands on lab
questions practice
01
OVERVIEW topics
OVERVIEW Topics
What is Emacs

Who is Richard Stallman

How to open and save files


What is a buffer and how to switch

Emacs from one to the other


How to use the mark and the point
Topics to set the region
How to cut and paste lines and
regions
How to search forward and
backward
How to cancel half-entered
commands
How to undo
How to quit Emacs
02
Learning Objectives
What is Emacs?

Emacs is a powerful, extensible text


editor that is often used for
programming and other tasks involving
text editing. It was originally
developed by Richard Stallman and his
team at MIT, and is now maintained by
the GNU Project.
Who is Richard Stallman?

Richard Stallman is a computer programmer and


activist who is best known for founding the
Free Software Foundation and for his work on
the GNU Project. He is a prominent advocate for
free software and open-source software, and has
been a vocal critic of proprietary software and
digital rights management.

Richard Stallman
How to open and save files

Type : `emacs`
To open a file in Emacs, you can use the
command `C-x C-f` (that is, hold the Ctrl key
and press x, release both keys, then hold the
Ctrl key again and press f). This will prompt
you to enter the name of the file you want to
open.

To save a file in Emacs, you can use the


command `C-x C-s`. This will save any changes
you have made to the file since it was last
saved.
What is a buffer and how to switch from one to the other

In Emacs, a buffer is a space in memory where


text is stored for editing.

You can have multiple buffers open at once,


and switch between them using the command
`C-x b` (hold the Ctrl key and press x, release
both keys, then type the name of the buffer
you want to switch to).

Advanced
`M-x ibuffer <RETURN/Enter>`
to list all buffer and choose one instead of
search
How to use the mark and the point to set the region

In Emacs, you can use the mark and point to


select a region of text for cutting, copying, or
other operations. To set the mark at the
current position of the cursor, you can use the
command `C-space`.

To move the cursor to another position and


extend the region, you can use the arrow keys.
Once you have selected the region, you can
use various commands to manipulate it.
How to cut and paste lines and regions

To cut a line or region in Emacs, you can use


the command `C-w`.

To paste the contents of the cut buffer, you


can use the command `C-y`.
How to search forward and backward

To search forward in Emacs, you can use the


command `C-s` (hold the Ctrl key and press s).
This will prompt you to enter the search term.

To search backward, you can use the command


`C-r`. This will prompt you to enter the search
term.
How to invoke commands by name

To invoke a command by name in Emacs, you


can use the command `M-x` (hold the Alt key
and press x). This will prompt you to enter the
name of the command.
How to undo

To undo a change in Emacs, you can use the


command `C- -` (hold the Ctrl key and press -).
This will undo the last change you made.

Or use the command `C-x u`


How to cancel half-entered commands

To cancel a half-entered command in Emacs,


you can use the command `C-g`. This will
cancel the current command and return you to
the previous state.
How to quit Emacs

To quit Emacs, you can use the command


`C-x C-c`. This will prompt you to save any
unsaved changes before exiting.
03
Quiz questions
04
Hands on lab Practice
Have a Question
Leave a Comment!
Subscribe
To stay updated with latest
videos

Share
To let the others know more
Thanks

You might also like