Files
mintlify__docs/zh/editor/keyboard-shortcuts.mdx
Ethan Palm 9a4ec7b557 Editor docs overhaul (#7112)
* Fix editor docs accuracy, split media page, clear translation orphans

Accuracy fixes, each verified against mintlify/mint or mintlify/server:

- pages.mdx: "Editors and managers can restore them" -> "admins".
  "Manager" is not a Mintlify role.
- index.mdx: publishing on a feature branch does not automatically open a
  pull request; you choose commit-to-branch or PR. Contradicted the
  branching page's own table.
- branching-and-publishing.mdx: preview deployments build when you open a
  pull request, not on every branch save. Confirmed in gitlabWebhooks
  (handleMergeRequestOpenEvent) and cruxWebhooks (keyed on reviewId).
  tutorial.mdx was already correct.
- settings.mdx: rewritten against editor-settings-form.tsx. The panel has
  four sections, not "two layers", and the entire Appearance section was
  undocumented - including "Open live preview in new tab", which
  live-preview.mdx already linked readers to. Corrected three setting
  labels, noted that draft PRs default to on, added the 20,000-character
  instruction limit.
- live-preview.mdx: link now resolves to /editor/settings#appearance.

De-bloat:

- Split the media section out of pages.mdx (172 lines, 15 subtopics) into
  editor/media.mdx and added it to the nav.
- Trimmed index.mdx from 11 sidebar-duplicating cards to 4.

Translation orphans and redirects:

- Deleted 7 translated files whose English source was removed in April and
  June. The translate automation never cleaned them up, and in PR #6062 it
  wrote into es|fr|zh/editor/media.mdx 34 days after the English source was
  deleted.
- Dropped /editor/media -> /editor/pages so it stops shadowing the
  recreated page.
- Added /{es,fr,zh}/editor/publish, completing an English-only redirect.
- Added /editor/collaborate and its language variants. That page was
  deleted in June with no redirect and has been a live 404 since.

mint broken-links clean, mint a11y clean, vale 0/0/0 on changed files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Restructure editor docs: 14 pages to 9, cut UI description

The editor section had grown to 14 pages, about 40% of which described
things a user can see on screen. The ratio was 105 field-enumeration
bullets to 42 procedural steps.

New structure, organized around what is invisible rather than what is
on screen:

  Overview      absorbs git-essentials (concepts + the Git mapping table)
  Tutorial      unchanged
  Edit content  absorbs media and navigation
  Publish       branch mechanics, conflicts, git sync, commit signing
  Review        previews, pull requests, approve and merge
  Collaborate   comments + suggestions + real-time editing
  Editor agent  trimmed
  Settings      absorbs configurations as a pointer
  Keyboard shortcuts  unchanged

Removed: git-essentials, media, navigation, live-preview, comments,
suggestions, configurations, branching-and-publishing. Added: publish,
review, collaborate.

configurations.mdx was the clearest cut. It was a 193-line field-by-field
mirror of the Site configurations panel, which is a third rendering of
information already in the docs.json schema and in organize/settings-*
(2,694 lines). It is now a short section in settings.mdx covering only
what is specific to editing configuration from the editor: real-time
sync, the SVG logo constraint, and the redirects interface.

Also cut: block actions, the minimap, code block options, right-click
menu enumerations, page settings field lists (already delegated to
/organize/pages), and most screenshots of self-evident controls.

1,320 to 848 body lines. Field-enumeration bullets 105 to 29.

English redirects added for all eight removed pages. Language variants
deliberately omitted: es/fr/zh still carry the old structure, so
redirecting those paths now would shadow pages that still exist there.
The translation automation should mirror this restructure; verify
afterward that no orphans remain.

Vale vocabulary widened rather than reworded around: autocommit(s|ed|ing)?,
autosav(e|es|ed|ing), dotfile(s)?.

mint broken-links clean, mint a11y clean, vale 0 errors on editor/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Correct keyboard shortcuts against the editor keymap

Verified every documented shortcut against the bindings in mintlify/mint
rather than inferring them. The app-level set is exhaustive:
mod+backslash, mod+i, mod+k, mod+s, mod+shift+period, mod+z, shift+mod+d,
shift+mod+s. Visual-mode bindings come from the Tiptap extensions.

- Cmd/Ctrl+Shift+F ("Switch between Navigation and Files tree") does not
  exist. No such binding is registered anywhere in the dashboard. Replaced
  with the real binding at that spot in the UI: Cmd/Ctrl+Shift+. toggles
  "Show all files".
- Added Heading 5 and Heading 6. Heading.configure sets levels 1-6 and
  preserves the parent Mod-Alt-N shortcuts; the table stopped at 4.
- Added Cmd/Ctrl+G for accordion group, bound in Accordions.tsx.

Confirmed correct and unchanged: Cmd+K search, Cmd+I agent, Cmd+Shift+S
mode toggle, Cmd+Shift+D diff, Cmd+\ sidebar, Cmd+Shift+M comment,
Cmd+Shift+E suggesting mode, Cmd+Shift+X strikethrough, Cmd+K link,
Cmd+Enter line break, Cmd+Shift+8 unordered list, and that source mode
runs Monaco.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Document auto publish, drop the deprecated deploy branch lock

Auto publish is available to all deployments, so the settings panel shows
"Auto publish" rather than "Main branch autocommits". It is not just a
rename: when it is on, the editor hides the branch selector and the
Publish button entirely (TopBar returns null for both), so there is no
pending state and no review step. Documented that behavior in
settings.mdx and added a note at the top of publish.mdx, since that page
otherwise assumes a publish step exists.

The deployment branch lock was deprecated and removed, so it stays out of
the docs. It was already dropped from settings.mdx in the restructure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* 💅

* copy edit index

* Fix editor docs I verified against dead code

Three claims traced to code that never mounts. Ethan confirmed the diff
shortcut does not work, which exposed the pattern.

- Removed Cmd/Ctrl+Shift+D for diff view. It is registered only at
  SubBar/index.tsx:488, inside EditorSubBar, which is exported and
  imported by nothing. There is no live diff shortcut; exitDiff exists
  only as an onClick in EditorModeContextMenu.
- Source mode runs CodeMirror, not Monaco. SourceEditor resolves through
  source-editor/index.tsx to editor-view.tsx, which imports
  @codemirror/state and @codemirror/view. Monaco is used only by
  EmbedModal. The shortcut rows themselves were correct: CodeMirror's
  defaultKeymap and searchKeymap match VS Code for toggle comment, move
  line, duplicate line, find, and add cursor above/below, all confirmed
  against @codemirror/commands.
- Rewrote the left panel section of pages.mdx. The tabs are Home and
  Publishing (EditorNavigationSidebarContents.tsx:62), not Navigation and
  Files. The Navigation/Files switcher lives in the same dead SubBar
  component. Home renders the workspace file tree including private
  pages; Publishing renders the site navigation and site settings.
  Confirmed by the e2e helper openPublishingNavigation, which queries the
  Publishing tab by role against the running app.

Also corrected in that section: the tree hides docs.json, dotfiles,
extensionless files, all-caps Markdown, and css/js/jsx/mjs/cjs/pdf unless
Show all files is on; "unlisted" was an invented term, replaced with a
link to /organize/hidden-pages; and the folder menu item is "New page",
confirmed by e2e, not "New file".

Added four source-mode bindings that are real and undocumented: Cmd+B and
Cmd+I insert Markdown markers, Cmd+Option+Shift+[ and ] fold and unfold
all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* copy edit pages

* copy edit publish

* copy edit review

* copy edit settings

* copy edit collaborate

* Updated mintlify pages

- Updated quickstart.mdx

Mintlify-Source: dashboard-editor

* copy edit keyboard shortcuts

* Updated mintlify pages

- Updated quickstart.mdx

Mintlify-Source: dashboard-editor

* Revert "Updated mintlify pages"

This reverts commit 8d1b50cbfc.

* Updated mintlify pages

- Updated quickstart.mdx

Mintlify-Source: dashboard-editor

* fix editor edits

* Mirror the editor restructure into es, fr, and zh

Brings all three translated sites onto the same nine-page structure as
English instead of waiting for the translate automation, which has a
documented history of leaving orphans behind.

Content:
- Deleted 21 orphans: branching-and-publishing, comments, configurations,
  git-essentials, live-preview, navigation, and suggestions in each
  language. None had an English source after the restructure.
- Added publish, review, and collaborate in each language.
- Rewrote index, pages, settings, agent, and keyboard-shortcuts to match
  the current English content, including Home/Publishing tabs, CodeMirror
  source mode, Show all files, and the restored Appearance section.
- Kept the existing conventions: es uses usted, fr uses vous, keywords and
  product UI labels stay in English, and every heading is wrapped in a
  <div id="english-slug"> so cross-language anchors resolve. Verified that
  every English anchor exists in all three languages.

Navigation and redirects:
- es.json, fr.json, and zh.json now list the same nine pages as docs.json.
- Removed six locale redirects that would have shadowed the new publish
  and collaborate pages once they existed.
- Added 21 locale redirects for the removed pages and retargeted the
  destinations that pointed at them.
- Retargeted four /editor/configurations redirects that pointed at
  #site-configurations, an anchor dropped in the settings rewrite.
- Rewrote stale links in changelog, authentication-setup, concepts, and
  glossary across all three languages, since broken-links does not follow
  redirects.

English fixes needed first, all caused by the settings restructure:
- Restored ## Appearance. Two pages link to #appearance, and its four
  preferences were otherwise undocumented.
- Restored ## Create draft pull requests by default, which changelog
  links to and which defaults to on.
- Promoted Main branch autocommits from ### to ##; it was nested under PR
  instructions, and its warning named a setting no longer on the page.
- Retargeted publish.mdx from the removed #auto-publish anchor.
- Fixed a missing space in the settings page intro.

mint broken-links clean, mint a11y clean (1042 files), vale 0 errors,
all five JSON files valid.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
2026-08-25 19:40:14 -07:00

160 lines
6.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "键盘快捷键"
description: "查看 Mintlify 网页编辑器的完整键盘快捷键列表,包括文本格式、导航和编辑命令。"
keywords: ["editor", "keys", "keyboard", "shortcuts"]
---
使用键盘快捷键可以在网页编辑器中更快地浏览和编辑。除下列快捷键外,编辑器还支持复制、粘贴、撤销和全选等常用快捷键。
<div id="editor-wide">
## 全局快捷键
</div>
无论处于哪种模式,这些快捷键都可用。
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **搜索文件和内容** | <kbd>Cmd</kbd> + <kbd>K</kbd> | <kbd>Ctrl</kbd> + <kbd>K</kbd> |
| **显示或隐藏 AI 助手**(未在编辑文本时) | <kbd>Cmd</kbd> + <kbd>I</kbd> | <kbd>Ctrl</kbd> + <kbd>I</kbd> |
| **在可视化模式与 source 模式之间切换** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> |
| **显示全部文件**(包括 dotfile 和非内容文件) | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>.</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>.</kbd> |
<div id="visual-mode">
## 可视化模式
</div>
在可视化模式下编辑时使用这些快捷键。
<div id="text-formatting">
### 文本格式
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **加粗** | <kbd>Cmd</kbd> + <kbd>B</kbd> | <kbd>Ctrl</kbd> + <kbd>B</kbd> |
| **斜体** | <kbd>Cmd</kbd> + <kbd>I</kbd> | <kbd>Ctrl</kbd> + <kbd>I</kbd> |
| **下划线** | <kbd>Cmd</kbd> + <kbd>U</kbd> | <kbd>Ctrl</kbd> + <kbd>U</kbd> |
| **删除线** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>X</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>X</kbd> |
| **代码** | <kbd>Cmd</kbd> + <kbd>E</kbd> | <kbd>Ctrl</kbd> + <kbd>E</kbd> |
| **下标** | <kbd>Cmd</kbd> + <kbd>,</kbd> | <kbd>Ctrl</kbd> + <kbd>,</kbd> |
| **上标** | <kbd>Cmd</kbd> + <kbd>.</kbd> | <kbd>Ctrl</kbd> + <kbd>.</kbd> |
<div id="headings">
### 标题
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **正文** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>0</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> |
| **标题 1** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>1</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> |
| **标题 2** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>2</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> |
| **标题 3** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>3</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> |
| **标题 4** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>4</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> |
| **标题 5** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>5</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>5</kbd> |
| **标题 6** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>6</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>6</kbd> |
<div id="lists-and-blocks">
### 列表和块
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **无序列表** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> |
| **引用块** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> |
<div id="content-actions">
### 内容操作
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| 为所选文本**添加链接** | <kbd>Cmd</kbd> + <kbd>K</kbd> | <kbd>Ctrl</kbd> + <kbd>K</kbd> |
| **添加换行** | <kbd>Cmd</kbd> + <kbd>Enter</kbd> | <kbd>Ctrl</kbd> + <kbd>Enter</kbd> |
| **对高亮文本发表评论** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>M</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>M</kbd> |
| **开启或关闭建议模式** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd> |
| **组件菜单** | <kbd>/</kbd> | <kbd>/</kbd> |
| **表情选择器** | <kbd>:</kbd> + 关键词 | <kbd>:</kbd> + 关键词 |
<div id="smart-substitutions">
### 智能替换
</div>
在你输入时,编辑器会自动把某些字符序列转换为排版符号。编辑器会跳过代码块和行内代码中的替换。
| 输入 | 结果 |
| :--- | :--- |
| `->` | → |
| `<-` | ← |
| `=>` | ⇒ |
| `<=` | ≤ |
| `>=` | ≥ |
| `!=` | ≠ |
<div id="source-mode">
## Source 模式
</div>
Source 模式使用 CodeMirror。除下列快捷键外,大多数常见的代码编辑器快捷键都可用。
<div id="search-and-navigation">
### 搜索和导航
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **搜索文件** | <kbd>Cmd</kbd> + <kbd>K</kbd> | <kbd>Ctrl</kbd> + <kbd>K</kbd> |
| **在页面内查找** | <kbd>Cmd</kbd> + <kbd>F</kbd> | <kbd>Ctrl</kbd> + <kbd>F</kbd> |
<div id="editing">
### 编辑
</div>
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **加粗**(用 `**` 包裹) | <kbd>Cmd</kbd> + <kbd>B</kbd> | <kbd>Ctrl</kbd> + <kbd>B</kbd> |
| **斜体**(用 `_` 包裹) | <kbd>Cmd</kbd> + <kbd>I</kbd> | <kbd>Ctrl</kbd> + <kbd>I</kbd> |
| **注释或取消注释** | <kbd>Cmd</kbd> + <kbd>/</kbd> | <kbd>Ctrl</kbd> + <kbd>/</kbd> |
| **全部折叠** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> |
| **全部展开** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> |
| **增加缩进** | <kbd>Tab</kbd> | <kbd>Tab</kbd> |
| **减少缩进** | <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>Shift</kbd> + <kbd>Tab</kbd> |
| **上移一行** | <kbd>Option</kbd> + <kbd>↑</kbd> | <kbd>Alt</kbd> + <kbd>↑</kbd> |
| **下移一行** | <kbd>Option</kbd> + <kbd>↓</kbd> | <kbd>Alt</kbd> + <kbd>↓</kbd> |
| **复制当前行** | <kbd>Shift</kbd> + <kbd>Option</kbd> + <kbd>↓</kbd> | <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>↓</kbd> |
<div id="multiple-cursors">
### 多光标
</div>
{/* vale Mintlify.WordList = NO */}
| 命令 | macOS | Windows |
| :--- | :--- | :--- |
| **添加光标** | <kbd>Option</kbd> + 点击 | <kbd>Alt</kbd> + 点击 |
| **在上方添加光标** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>↑</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>↑</kbd> |
| **在下方添加光标** | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>↓</kbd> | <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>↓</kbd> |
{/* vale Mintlify.WordList = YES */}