---
title: Keyboard shortcuts
description: The default key for every command that has one, and how to change it.
type: reference
---

# Keyboard shortcuts {#keyboard-shortcuts}

These are the defaults. Every one of them can be changed in **File > Settings > Bindings**, which also lists the commands that have no key until you give them one.

**Ctrl** here means the platform's menu key: Control on Linux and Windows, Command on macOS.

## Files {#files}

| Command | Key |
| --- | --- |
| New Document | Ctrl+N |
| Open a file | Ctrl+O |
| Save current file | Ctrl+S |
| Save all files | Ctrl+Shift+S |
| Close current file | Ctrl+W |
| Close all files | Ctrl+Shift+W |

## Views and panels {#views-and-panels}

| Command | Key |
| --- | --- |
| Show the Editor view | Ctrl+Alt+E |
| Show the Author view | Ctrl+Alt+A |
| Show the Author view beside the source | Ctrl+Alt+S |
| Show or hide the primary sidebar | Ctrl+B |
| Show or hide the secondary sidebar | Ctrl+Alt+B |
| Show or hide the bottom panel | Ctrl+J |
| Select Document | Alt+1 |
| Preview in Tab | Ctrl+Shift+V |
| Preview in Split | Ctrl+Alt+P |

## Editing {#editing}

| Command | Key |
| --- | --- |
| Undo last edit | Ctrl+Z |
| Redo previous undo | Ctrl+Y |
| Cut | Ctrl+X |
| Copy | Ctrl+C |
| Paste | Ctrl+V |
| Select All | Ctrl+A |
| Indent | Tab |
| Unindent | Shift+Tab |

## Finding and moving {#finding-and-moving}

| Command | Key |
| --- | --- |
| Find in current document | Ctrl+F |
| Replace in current document | Ctrl+H |
| Goto line number | Ctrl+G |
| Moves to beginning of data | Ctrl+Home |
| Moves to end of data | Ctrl+End |
| Moves to beginning of next word | Ctrl+Right |
| Moves to beginning of previous word | Ctrl+Left |
| Toggle bookmark | Ctrl+M |
| Select Bookmark | Ctrl+Shift+B |

## Markup {#markup}

| Command | Key |
| --- | --- |
| Tag | Ctrl+T |
| Repeat last Tag | Ctrl+Shift+T |
| Rename an Element | Ctrl+R |
| Expand an empty Element | Ctrl+L |
| Add a comment | Ctrl+K |
| Insert Special Character | Ctrl+I |
| Select Element | Ctrl+E |
| Select Element Content | Ctrl+Shift+E |
| Select Fragment | Ctrl+Shift+Space |
| Goto start tag | Ctrl+Up |
| Goto end tag | Ctrl+Down |
| Goto next Attribute value | Ctrl+Shift+Down |
| Goto previous Attribute value | Ctrl+Shift+Up |

## Changing a key {#changing-a-key}

Select **File > Settings > Bindings**, find the command (typing in the filter box narrows the list) and select **Change…**. Press the combination you want. Escape on its own cancels; Escape with a modifier is a combination like any other, so Ctrl+Escape can be bound.

**Bind nothing** leaves a command with no key. **Reset** restores one command's default, **Reset all** restores every default.

Only the keys you change are saved, so a command whose default improves in a later release follows the new one unless you have chosen something yourself. If you pick a key another command already uses, the editor says which.
