Linux

Emacs

46 flashcards · answers and spaced-repetition review in the KnowCard app

The Emacs name is often mocked as "Escape Meta Alt Control Shift" because of its dense key sequences. What does the acronym actually stand for, and what is Emacs beyond a text editor?
In Emacs, both loading and saving a file start with the same two-key prefix. What are the three core commands for opening a file, saving it, and saving it under a new name?
You mistype a keystroke and get a menu, then hit Ctrl+X Ctrl+C by accident with unsaved work. How do you exit Emacs, and what limit does its undo have?
You started typing an Emacs command, or hit Esc by mistake, and Emacs is now waiting for more input. How do you cancel out of a half-entered command?
A newcomer wants Emacs to teach itself and to look up what a key does. Which help commands start the built-in tutorial, list all key bindings, and describe a command?
You open a .c file and Emacs auto-indents lines in ways you don't want. What is the rule about how many major vs minor modes can be active, and how do you fall back to a plain mode?
Besides menus and key shortcuts, Emacs lets you invoke any command by its full name. How do you do that, and what conveniences help you type or recall the name?
Emacs documentation writes shortcuts like C-x, M-x, and DEL rather than Ctrl/Alt. What do these notation symbols map to on a normal PC keyboard?
Beyond arrow keys, Emacs has fast cursor moves. Which shortcuts move by word, jump to line start/end, and jump directly to a given line number?
You want the same Emacs command to run 30 times in a row without pressing it 30 times. What is the mechanism, and what is the easy trap with entering the count?
In Emacs you delete a word and the end of a line, then realize you needed that text elsewhere. Which delete commands are involved, and how do you get the text back?
To delete an arbitrary text range in Emacs (not just a word or line), you first select it. How do you set the selection, kill the selected region, and swap the two endpoints?
By default Emacs uses Ctrl+C/Ctrl+X/Ctrl+V for its own commands, not clipboard operations. What mode makes them behave as copy/cut/paste like everywhere else, and when does it kick in?
You typed "sawp" instead of "swap" and want to fix it with a keystroke. Which Emacs commands transpose two adjacent letters versus two words, and where must the cursor sit for the letter fix?
Emacs tabs behave differently in text vs code, and the default width surprises people. What is the default tab width, and how do you change it or make Tab insert spaces instead?
You've selected a block of code in Emacs and want to shift it right, then shift some of it back left. Which command indents the region, and how do you make it outdent or indent by a chosen amount?
You need to edit a rectangular block spanning several lines in Emacs — like a column in a table or trailing comments. What kind of commands handle this, and how do you open, kill, and yank a rectangle?
Emacs doesn't auto-wrap continuous text by default — long lines just show a backslash and continue. How do you rewrap an existing paragraph, and how do you make new typing wrap automatically? What's the danger?
You start typing "env" in Emacs and want it completed to "environment" without configuring any abbreviation first. What feature does this, and where does it pull completions from?
Plain incremental search only finds exact text. How do you start a regular-expression search in Emacs, and what do the patterns for word start, line boundaries, and "any characters" look like?
You want to search and replace across a file in Emacs, and later do it with regex capture groups. Which command starts each, and what placeholders reference the matched text in the replacement?
In Emacs, what is the distinction between a buffer and a window, and can one buffer appear in two places at once?
Which Emacs commands switch the active buffer, list all buffers, and delete a buffer — and what safeguard applies when deleting?
You've got the help buffer cluttering your Emacs frame and want to move between panes, close extras, and split the view. Which commands move to the next window, delete all but the current, and split horizontally vs vertically?
How do you explicitly set a major mode in Emacs for editing C, Java, or LaTeX, and which mode is the plain default with no special behavior?
Where does Emacs keep its user configuration, what language is it written in, and what surprising reason might explain why two fresh accounts behave differently out of the box?
In an Emacs .emacs file, which Lisp forms set a variable versus bind a key to a function? Give the typical shape for making Tab insert spaces and for rebinding a function key.
Emacs ships without a PHP mode or a Markdown mode by default. Where do you get such extensions, what does the archive's name stand for, and how do you open the package manager?
Emacs search jumps as soon as you type the first character. What is this called, which keys search forward vs backward, and how do you jump to the next match?
Emacs help does more than the tutorial. Which F1 commands give an overview of all help, describe what a specific key does, open the info manuals, and report the current mode?
On a minimal server or a rescue system, full GNU Emacs feels heavy. Which lightweight Emacs-compatible editors exist, and why prefer them there?
Beyond opening and saving the current file, how do you drop another file's contents into your text at the cursor, and save every modified buffer at once?
You're running Emacs in a text console and want to pop back to the shell briefly without quitting. Which key does that, and how does it differ in graphics mode?
You need to type a euro sign or another character that isn't on your keyboard. How do you insert a character by its Unicode code point in Emacs?
You want to bookmark your current spot in a long file and jump back to it later. What are Emacs registers for cursor positions, and do they survive a restart?
Ctrl+K kills to the end of the line, but sometimes you need to kill backward or up to a specific character. Which Emacs kill commands cover the previous word, the start of the line, and up to a character?
By default, typing in Emacs pushes existing text to the right. How do you switch to overwriting characters instead, and how do you switch back?
You press Tab in Emacs and get inconsistent results — sometimes a tab, sometimes code indentation, sometimes nothing. Why, how do you force a literal tab, and how do you convert between tabs and spaces?
During an interactive query-replace in Emacs you're prompted at each match. Which keys replace-and-continue, skip, replace-all, pause to fix, and abort — and how do you undo a replace that went wrong?
In Emacs docs a "window" isn't what GNOME or KDE calls a window. What does an Emacs window actually mean, and how do you open a real OS-level second window?
A file's extension doesn't always tell Emacs which mode to use. How can the file itself force a specific Emacs mode when it loads?
Your Emacs behaves differently than the manual describes even with an empty ~/.emacs. Where do distributions put global Emacs configuration that can explain this?
Without editing .emacs, how do you quickly enlarge the Emacs font, set a permanent default font, and reach the thousands of GUI customization options — and what's the catch when saving them?
What are some common one-line settings to put in ~/.emacs to suppress the welcome screen, show row/column numbers, highlight matching brackets, and keep backup files out of your working directories?
You toggle Emacs's syntax coloring on while editing a C file — does that reset you back to fundamental mode? Explain how minor modes relate to the major mode.
The word- and line-motion keys aren't enough — you want to jump to the very top or bottom of a file, recenter the view, or scroll a full page. Which Emacs keys do that?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play