Emacs: Xah Fly Keys Tutorial

By Xah Lee. Date: . Last updated: .

Here's Xah Fly Keys tutorial for beginners. I assume you have made no customization.

Pick a Layout

All keybinding shortcuts on this page changes accordingly.

1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x y z , . ' \ / = - unsplit [ split - ] split | ; ` Xah Fly Keys command mode layout M-x ()⌫ insert mark ¶|← →|¶ ⌦w format ␣⌫ w⌫ cancel undo →w w← Case search paste cut copy cmt (← →) (↔) next w leader key

Activate Command Mode, Insert Mode

Exit Emacs

Cursor Movement

Move by char

   i
 j k l

Try them. Try many times. Feel your finger muscles with the cursor movement.

Move by word

Move by paragraph

Repeated call moves by paragraph.

Move to beginning of buffer

Text Editing

undo

To redo, do an undo, then press key to switch to command mode (or Ctrl+g), then do undo. To reverse direction, press Ctrl+g again.

💡 TIP: I recommend not to use any external undo/redo package.

Cut Copy Paste

To paste something twice, call paste, then enter space or return or switch command mode, then paste again.

To paste something 5 times, Space . (universal-argument) 5, then call paste.

Cut All, Copy All

Mark and Text Selection

Select All

Call Command by Name (M-x)

Search Text

When in isearch:

💡 TIP: i recommend not installing external packages to jump cursor to locations.

Find Replace

New Open Close Save

You can use the following standard keys.

When you are comfortable with Xah Fly Keys, and do not want to use Control key, then use the following.

Open Files

Open Recently Opened File, Recently Closed File

Emacs: Open Recently Opened File

Bookmark

Emacs: Bookmark

Switch Buffer

Split Window

Switch Window

Working with Quote and Brackets

xah-fly-keys has a system to work with brackets. Brackets includes ()[]{}“” and all Unicode: Brackets, Quotes 「」【】《》

Move to Brackets

Select Bracket Text

when cursor is on a bracket, H (xah-extend-selection) selects the whole.

Delete Whole Bracketed Text

d (xah-smart-delete) → When the left char is a bracket, delete the bracketed text. The deleted text is automatically copied.

Delete Bracket Pair

move cursor to the right of a bracket, then Space . (universal-argument) d (xah-smart-delete)

Delete a Single Bracket

move cursor to the right of it, then press E.

Insert Brackets

Now, type Space d Ctrl+h to see all other brackets and quotes you can insert.

💡 TIP: Always insert bracket pairs together.

Change Brackets

Font Size

List All Leader Keys

More Advanced

〔see Emacs: Copy to Register

More Leader Keys

There are about 200 commands with leader key prefix. They basically replace what emacs C-x does.

Learn them as you go.

When in command mode, press Space Ctrl+h to list all leader key sequence commands.

Remember to use Alt+x describe-function and Alt+x describe-key to find what's the key or command name.