Skip to content

Use Commands and Interactions

By the end of this chapter, you will have found a command, inspected its bindings, and cancelled a prompt without changing a document.

Use the nonmodal profile from the first editing session. C- means Control; M- means Meta, usually Alt. Chords separated by spaces are sequential: C-x C-s is Control-x followed by Control-s.

Find and Run a Command

Press Alt-x, type list-buffers, and press Enter. The buffer inventory opens. Press q to return to the document. Repeat Alt-x with find-file, then press Ctrl-G at the path prompt. The current document and its unsaved text remain.

Command candidates show a name, contextual binding when one exists, and a short description. Type to filter; Up/Down or Ctrl-P/Ctrl-N moves the selected row. Page Up/Down moves through visible pages. Enter confirms the selected command. Highlighting alone does not execute it.

Commands that need a path, name, or other value open another interaction. Read its prompt before accepting. Ctrl-G cancels pending interaction. During incremental search, one cancellation can first remove a failing query suffix; a subsequent cancellation returns to the original location.

Inspect Effective Controls

Use Ctrl-X h to open Help, enter context, and press Enter. Read the current profile, state, and configuration source. Ctrl-G closes Help. Personal and contextual maps can change ordinary shortcuts; Help reports the active values. Alt-x and Ctrl-G are protected across the supported profiles and states.

Nonmodal keysAction
C-x C-fOpen a file or directory.
C-x C-sSave the current buffer.
C-x bSwitch buffers or create a named buffer.
C-z, C-x C-zUndo and redo.
C-s, C-rSearch forward and backward.
M-xFind and run a named command.
C-gCancel the current interaction.
C-q, C-x C-cRequest exit and resolve modified buffers.

The optional modal profile uses its own states and bindings. The command reference records current names, profiles, and exact behavior.

Previous: Edit Your First File | Part | User Guide | Next: Editing