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

Working With Emacs: Linux Foundation

This document provides summaries of key commands for working with the emacs text editor, including commands for editing and navigating files, searching for text, and working with selections of text. It lists keyboard shortcuts for starting and saving emacs, moving the cursor position, searching forward and backward, and cutting, copying, and pasting text.

Uploaded by

Ankit Goyal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Working With Emacs: Linux Foundation

This document provides summaries of key commands for working with the emacs text editor, including commands for editing and navigating files, searching for text, and working with selections of text. It lists keyboard shortcuts for starting and saving emacs, moving the cursor position, searching forward and backward, and cutting, copying, and pasting text.

Uploaded by

Ankit Goyal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Foundation

Working with emacs


emacs
Ctrl-x
Ctrl-x
Ctrl-x

Key
myfile
i
s
Ctrl-w

Ctrl-x Ctrl-s
Ctrl-x Ctrl-c

Usage
Start emacs and edit myfile
Insert prompted for file at current position
Write to the file keeping current name
Write to the file giving a new name when
prompted
Write to all files currently being worked on and
exit
Exit after being prompted if there any unwritten
modified files

Changing Cursor Positions


Key
arrow keys
Ctrl-n
Ctrl-p
Ctrl-f
Ctrl-b
Ctrl-a
Ctrl-e
E-f
E-b
E-<
E-x
E->
Ctrl-v or Page
Down
E-v or Page Up
Ctrl-l

Usage
Use the arrow keys for up, down, left and right
one line down
one line up
one character left
one character right
move to beginning of line
move to end of line
move to beginning of next word
move back to beginning of preceding word
move to beginning of file
goto-line n move to line n
move to end of file
move forward one page
move backward one page
refresh and center screen

Searching for Text


Key
Ctrl-s

Usage
search forward for prompted for pattern, or for next
pattern

Introduction to Linux

1 of 2

Ctrl-r

search backwards for prompted for pattern, or for next


pattern

Working with Text


Key
Ctrl-o
Ctrl-d
Ctrl-k
Ctrl-_
Ctrl- space
Ctrl-w
Ctrl-y

Usage
Insert a blank line.
Delete character at current position.
Delete the rest of the current line.
Undo the previous operation.
Mark the beginning of the selected region. The end will
be at the cursor position.
Delete the current marked text and write it to the
buffer.
Insert at current cursor location whatever was most
recently deleted

Introduction to Linux

2 of 2

You might also like