mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 14:19:33 +08:00

* Add command palette and quick open dialog * Fix format and paragraph commands * Adjust style and allow to reset list/quote * Adjust UI and fix some issues * Add custom placeholder
13 KiB
13 KiB
Key Bindings
All key bindings can be overwritten with the keybindings.json
file. The file is located in the application data directory. Each entry consists of a id
/accelerator
pair in JSON format.
Here is an example:
{
"file.save": "CmdOrCtrl+Shift+S",
"file.save-as": "CmdOrCtrl+S"
}
Available modifiers
CmdOrCtrl
Cmd
on macOSCtrl
Alt
/AltGr
orOption
on macOSShift
Super
on Linux and Windows
Available keys
0-9
,A-Z
,F1-F24
and punctuationsPlus
,Space
,Tab
,Backspace
,Delete
,Insert
,Return/Enter
,Esc
,Home
,End
andPrintScreen
Up
,Down
,Left
andRight
PageUp
andPageDown
- Empty string
""
to unset a accelerator
Available id's
Mark Text menu (macOS only):
Id | Default | Description |
---|---|---|
mt.hide |
Command+H | Hide Mark Text |
mt.hide-others |
Command+Alt+H | Hide all other windows except Mark Text |
file.preferences |
Command+, | Open settings window |
file.quit |
Command+Q | Quit Mark Text |
File menu:
Id | Default | Description |
---|---|---|
file.new-file |
CmdOrCtrl+N | New file |
file.new-tab |
CmdOrCtrl+T | New tab |
file.open-file |
CmdOrCtrl+O | Open markdown file |
file.open-folder |
CmdOrCtrl+Shift+O | Open folder |
file.save |
CmdOrCtrl+S | Save |
file.save-as |
CmdOrCtrl+Shift+S | Save as... |
file.print |
- | Print current tab |
file.preferences |
Ctrl+, | Open settings window (Linux/Windows only) |
file.close-tab |
CmdOrCtrl+W | Close tab |
file.close-window |
CmdOrCtrl+Shift+W | Close window |
file.quit |
CmdOrCtrl+Q | Quit Mark Text (Linux/Windows only) |
Edit menu:
Id | Default | Description |
---|---|---|
edit.undo |
CmdOrCtrl+Z | Undo last operation |
edit.redo |
CmdOrCtrl+Shift+Z | Redo last operation |
edit.cut |
CmdOrCtrl+X | Cut selected text |
edit.copy |
CmdOrCtrl+C | Copy selected text |
edit.paste |
CmdOrCtrl+V | Paste text |
edit.copy-as-markdown |
CmdOrCtrl+Shift+C | Copy selected text as markdown |
edit.copy-as-plaintext |
CmdOrCtrl+Shift+V | Copy selected text as plaintext |
edit.select-all |
CmdOrCtrl+A | Select all text of the document |
edit.duplicate |
CmdOrCtrl+Alt+P | Duplicate the current paragraph |
edit.create-paragraph |
CmdOrCtrl+Shift+N | Create a new paragraph after the current one |
edit.delete-paragraph |
CmdOrCtrl+Shift+D | Delete current paragraph |
edit.find |
CmdOrCtrl+F | Find information in the document |
edit.find-next |
CmdOrCtrl+Alt+U | Continue the search and find the next match |
edit.find-previous |
CmdOrCtrl+Shift+U | Continue the search and find the previous match |
edit.replace |
CmdOrCtrl+Alt+F | Replace the information with a replacement |
edit.find-in-folder |
CmdOrCtrl+Shift+F | Find files contain the keyword in opend folder |
edit.aidou |
CmdOrCtrl+/ | Show Aidou dialog |
edit.screenshot |
Command+Alt+A | Get the screenshot (macOS only) |
Paragraph menu:
Id | Default | Description |
---|---|---|
paragraph.heading-1 |
CmdOrCtrl+1 | Set line as heading 1 |
paragraph.heading-2 |
CmdOrCtrl+2 | Set line as heading 2 |
paragraph.heading-3 |
CmdOrCtrl+3 | Set line as heading 3 |
paragraph.heading-4 |
CmdOrCtrl+4 | Set line as heading 4 |
paragraph.heading-5 |
CmdOrCtrl+5 | Set line as heading 5 |
paragraph.heading-6 |
CmdOrCtrl+6 | Set line as heading 6 |
paragraph.upgrade-heading |
CmdOrCtrl+= | Upgrade a heading |
paragraph.degrade-heading |
CmdOrCtrl+- | Degrade a heading |
paragraph.table |
CmdOrCtrl+Shift+T | Insert a table |
paragraph.code-fence |
CmdOrCtrl+Alt+C | Insert a code block |
paragraph.quote-block |
CmdOrCtrl+Alt+Q | Insert a quote block |
paragraph.math-formula |
CmdOrCtrl+Alt+M | Insert a math block |
paragraph.html-block |
CmdOrCtrl+Alt+J/H | Insert a HTML block (J on macOS, H otherwise) |
paragraph.order-list |
CmdOrCtrl+Alt+O | Insert a ordered list |
paragraph.bullet-list |
CmdOrCtrl+Alt+U | Insert a unordered list |
paragraph.task-list |
CmdOrCtrl+Alt+X | Insert a task list |
paragraph.loose-list-item |
CmdOrCtrl+Alt+L | Convert a list item to a loose list item |
paragraph.paragraph |
CmdOrCtrl+0 | Convert a heading to a paragraph |
paragraph.horizontal-line |
CmdOrCtrl+Alt+- | Add a horizontal line |
paragraph.front-matter |
CmdOrCtrl+Alt+Y | Insert a YAML frontmatter block |
Format menu:
Id | Default | Description |
---|---|---|
format.strong |
CmdOrCtrl+B | Set the font of the selected text to bold |
format.emphasis |
CmdOrCtrl+I | Set the font of the selected text to italic |
format.underline |
CmdOrCtrl+U | Change the selected text to underline |
format.highlight |
CmdOrCtrl+Shift+H | Highlight the selected text by tag |
format.inline-code |
CmdOrCtrl+` | Change the selected text to inline code |
format.inline-math |
CmdOrCtrl+Shift+M | Change the selected text to inline math |
format.strike |
CmdOrCtrl+D | Strike through the selected text |
format.hyperlink |
CmdOrCtrl+L | Insert a hyperlink |
format.image |
CmdOrCtrl+Shift+I | Insert a image |
format.clear-format |
CmdOrCtrl+Shift+R | Clear the formatting of the selected text |
Window menu:
Id | Default | Description |
---|---|---|
window.minimize |
CmdOrCtrl+M | Minimize the window |
window.toggle-full-screen |
F11 | Toggle fullscreen mode (or Ctrl+Command+F on macOS) |
View menu:
Id | Default | Description |
---|---|---|
view.command-palette |
CmdOrCtrl+Shift+P | Toggle command palette |
view.source-code-mode |
CmdOrCtrl+Alt+S | Switch to source code mode |
view.typewriter-mode |
CmdOrCtrl+Alt+T | Enable typewriter mode |
view.focus-mode |
CmdOrCtrl+Shift+F | Enable focus mode |
view.toggle-sidebar |
CmdOrCtrl+J | Toggle sidebar |
view.toggle-tabbar |
CmdOrCtrl+Alt+B | Toggle tabbar |
view.toggle-dev-tools |
CmdOrCtrl+Alt+I | Toggle developer tools (debug mode only) |
view.dev-reload |
CmdOrCtrl+R | Reload window (debug mode only) |
Misc
Id | Default | Description |
---|---|---|
tabs.cycle-forward |
CmdOrCtrl+Tab | Cycle through tabs |
tabs.cycle-backward |
CmdOrCtrl+Shift+Tab | Cycle backwards through tabs |
tabs.switch-to-left |
CmdOrCtrl+PageUp | Switch tab to the left |
tabs.switch-to-right |
CmdOrCtrl+PageDown | Switch tab to the right |
file.quick-open |
CmdOrCtrl+P | Open quick open dialog |