GNU Emacs keyboard shortcuts 

GNU Emacs    

Zeynel -
7 years ago
- Shortcuts
0
Ctrl + X then )

End keyboard macro definition

0
Ctrl + X then E

Eappend to last keyboard macro

0
Ctrl + X then Ctrl + E

Eval sexp before point

0
Ctrl + ♦ Meta + X

Eval current defun

0
♦ Meta + :

Read and eval minibuffer

0
♦ Meta + % then ♦ Meta + X

(then query-replace-regexp) Interactively replace a text string using regular expressions

0
Ctrl + ♦ Meta + C

Exit recursive edit

0
Ctrl + X then 5 then 1

Delete all other windows (for frame)

0
Ctrl + X then 2

Split window, above and below

-1
Ctrl + + X then 5 then 2

Split window, above and below (for frame)

0
Ctrl + X then 0

Delete this window

0
Ctrl + X then 5 then 0

Delete this window (for frame)

0
Ctrl + X then 3

Split window, side by side

0
Ctrl + X then 5 then O

Switch cursor to another window (for frame)

0
Ctrl + X then 4 then B

Select buffer in other window

0
Ctrl + X then 5 then B

Select buffer in other window (for frame)

0
Ctrl + X then 4 then Ctrl + O

Display buffer in other window

0
Ctrl + X then 5 then Ctrl + O

Display buffer in other window (for frame)

0
Ctrl + X then 4 then F

Find file in other window

0
Ctrl + X then 5 then F

Find file in other window (for frame)

0
Ctrl + X then 4 then R

Find file read-only in other window

0
Ctrl + X then 5 then R

Find file read-only in other window (for frame)

0
Ctrl + X then 4 then D

Run Dired in other window

0
Ctrl + X then 5 then D

Run Dired in other window (for frame)

0
Ctrl + X then 4 then .

Find tag in other window

0
Ctrl + X then 5 then .

Find tag in other window (for frame)

0
Ctrl + X then ^

Grow window taller

0
Ctrl + X then {

Shrink window smaller

0
Ctrl + X then }

Grow window wider

0
Ctrl + ♦ Meta + \

Indent region (mode-dependent)

0
Ctrl + ♦ Meta + Q

Indent sexp (mode-dependent)

0
Ctrl + X then Tab

Indent region rigidly arg columns

-1
♦ Meta + ;

Indent for comment

-1
Ctrl + ♦ Meta + O

Move rest of line vertically down

0
Ctrl + X then Ctrl + O

Delete blank lines around point

0
♦ Meta + ^

Join line with previous (with arg, next)

0
♦ Meta + \

Delete all white space around point

0
Ctrl + U then ♦ Meta + .

Find next occurence of a tag

0
♦ Meta + ,

Continue last tags search on query-replace

0
♦ Meta + !

Execute a shell command

0
♦ Meta + &

Execute a shell command asynchronously

0
♦ Meta + |

Run a shell command on the region

0
Ctrl + X then R then R

Copy rectangle to register

0
Ctrl + X then R then K

Kill rectangle

0
Ctrl + X then R then Y

Yank rectangle

0
Ctrl + X then R then O

Open rectangle, shifting text right

0
Ctrl + X then R then C

Black out rectangle

0
Ctrl + X then R then T

Prefix each line with string

0
Ctrl + X then A then G

Add global abbrev

0
Ctrl + X then A then L

Add mode-local abbrev

0
Ctrl + X then A then I then G

Add global expansion for this abbrev

0
Ctrl + X then A then I then L

Add mode-local expansion for this abbrev

0
Ctrl + X then A then E

Explicitly expand abbrev

0
♦ Meta + /

Expand previous word dynamically

0
Ctrl + U then Num 0 - Num 9

Numeric argument

0
Ctrl + ♦ Meta + K

sexp - forward

0
♦ Meta + W

Copy region to kill ring

0
♦ Meta + Z

then press char to kill through next occurence of char

0
♦ Meta + 0 then Ctrl + K

Line (to end of) - backward

Advertisement

0
Ctrl + X then Del

Sentence - backward

0
Ctrl + X then F

Set fill column to arg

0
Ctrl + X then .

Prefix each line starts with

0
♦ Meta + O

Set face

0
Ctrl + X then Ctrl + X

Exchange point and mark

0
♦ Meta + @

Set mark arg words away

0
♦ Meta + H

Mark paragraph

0
Ctrl + X then Ctrl + P

Mark page

0
Ctrl + ♦ Meta + @

Mark sexp

0
Ctrl + ♦ Meta + H

Mark function

0
♦ Meta + - then Ctrl + ♦ Meta + K

sexp - backward

Advertisement

The help system is simple. Type Ctrl + H or F1 and follow the directions. If you are a first time user, type Ctrl + H for a tutorial.
Use Ctrl + S or Ctrl + R again to repeat the search in either direction. If Emacs is still searching, Ctrl + G cancels only the part not matched.
Valid responses in query-replace mode are replace, skip, back up and exit.
The following keys are defined in the minibuffer.

Share this page on:
Is this page helpful?
0 0

What is your favorite GNU Emacs hotkey? Do you have any useful tips for it? Let other users know below.


Only registered users can post links.
 
No comments yet. Ask, or type the first one!

Latest articles