Keyboard shortcuts

Every key the editor understands. On a Mac, Ctrl is ⌘ and Alt is ⌥ unless shown otherwise. Press F1 in the editor to see this list there.

Compiling and the PDF

Windows and LinuxMacWhat it does
Ctrl + S⌘ + SSave and compile
Ctrl + Enter⌘ + EnterCompile
Ctrl + Alt + J⌘ + ⌥ + JJump from the cursor to the same place in the PDF
Double-click in the PDFDouble-click in the PDFJump from the PDF to the source line
Ctrl + F (PDF last clicked)⌘ + F (PDF last clicked)Search the PDF

Formatting and inserting

Windows and LinuxMacWhat it does
Ctrl + B⌘ + BBold — \textbf{…} around the selection
Ctrl + I⌘ + IItalics — \emph{…} around the selection
Ctrl + /⌘ + /Comment or uncomment the selected lines (%)
TabTabIndent the selected lines
Shift + Tab⇧ + TabOutdent the selected lines
Ctrl + ] · Ctrl + [⌘ + ] · ⌘ + [Indent · outdent the current line
Ctrl + Alt + \⌘ + ⌥ + \Re-indent the selection
Ctrl + SpaceCtrl + SpaceShow suggestions: commands, environments, citation keys, labels
Ctrl + Space (in the \cite list)Ctrl + Space (in the \cite list)Search for a reference to add
Enter · TabEnter · TabAccept a suggestion; Tab moves to the next field of a snippet
Alt + Enter⌥ + EnterCheck the paragraph at the cursor (writing assistant on)
Ctrl + Alt + M⌘ + ⌥ + MComment on the selected text (Ctrl + Enter sends, Escape closes)

Editing lines

Windows and LinuxMacWhat it does
Alt + ↑ / ↓⌥ + ↑ / ↓Move the line or selection up / down
Shift + Alt + ↑ / ↓⇧ + ⌥ + ↑ / ↓Copy the line up / down
Ctrl + Shift + K⌘ + ⇧ + KDelete the line
Ctrl + Backspace / Delete⌥ + Backspace / DeleteDelete the word before / after the cursor
Ctrl + Shift + \⌘ + ⇧ + \Jump to the matching bracket
Alt + LCtrl + LSelect the line
EscapeEscapeBack to a single cursor

Several cursors

Windows and LinuxMacWhat it does
Ctrl + D⌘ + DAdd the next occurrence of the selection
Ctrl + Shift + L⌘ + ⇧ + LSelect every occurrence of the selection
Ctrl + Alt + ↑ / ↓⌘ + ⌥ + ↑ / ↓Add a cursor on the line above / below
Alt + drag⌥ + dragSelect a rectangle

Finding

Windows and LinuxMacWhat it does
Ctrl + F⌘ + FFind in the file
Ctrl + H⌘ + HFind and replace
F3 · Ctrl + GF3 · ⌘ + GNext match
Shift + F3 · Ctrl + Shift + G⇧ + F3 · ⌘ + ⇧ + GPrevious match
Ctrl + Alt + G⌘ + ⌥ + GGo to line
EscapeEscapeClose the find panel

Undo and selection

Windows and LinuxMacWhat it does
Ctrl + Z⌘ + ZUndo
Ctrl + Y · Ctrl + Shift + Z⌘ + ⇧ + ZRedo
Ctrl + U · Alt + U⌘ + U · ⌘ + ⇧ + UUndo · redo the last selection change
Ctrl + A⌘ + ASelect all (also in submitted, read-only files)
Shift + arrows⇧ + arrowsExtend the selection
Ctrl + Shift + ← / →⌥ + ⇧ + ← / →Extend the selection by a word
Alt + ← / →Ctrl + ← / →Move by a syntax unit (a command, a group)

Moving around

Windows and LinuxMacWhat it does
Ctrl + ← / →⌥ + ← / →Previous / next word
Home · End⌘ + ← / →Start / end of the line
Ctrl + Home · Ctrl + End⌘ + ↑ / ↓Start / end of the file
Page Up · Page DownPage Up · Page DownUp / down a screen

The workspace

Windows and LinuxMacWhat it does
Ctrl + Alt + B⌘ + ⌥ + BShow / hide the file list
Ctrl + Shift + M⌘ + ⇧ + MFocus mode: the editor alone, and back
F1F1Keyboard shortcuts
EscapeEscapeClose a menu, panel or dialog
Ctrl + M, then Tab⇧ + ⌥ + M, then TabLet Tab move focus out of the editor (press again to turn off)
Escape, then TabEscape, then TabMove focus out of the editor once

Vim and Emacs keys

Turn on in View → Editing mode, or Settings.

Windows and LinuxMacWhat it does
VimVimNormal, insert and visual modes, operators, counts, and the : command line
Ctrl + A / E (Emacs)Ctrl + A / EStart / end of the line
Ctrl + F / B / N / P (Emacs)Ctrl + F / B / N / PForward / back a character, next / previous line
Ctrl + D / K (Emacs)Ctrl + D / KDelete a character / to the end of the line