用于 Visual Studio Code 的 Markdown 支持
所用插件:Markdown All in One,本文是 README.md
的中文版。
此插件包含了用于 Markdown 的所有你需要的功能(键盘快捷键、目录生成、自动预览和更多)。
1. 特性
1.1 键盘快捷键(切换粗体、斜体、code span、划线和标题)
- 切换粗体
- 选中/取消选中任务列表项
1.2 目录生成
TOC
的缩进规则(制表符或空格)将与当前文件相同(请在右下角找到它)- 要使
TOC
与GitHub
兼容,需要将选项githubCompatibility
设置为true
- 使用
<!-- omit in toc -->
忽略TOC
中的特定标题
1.3 列表编辑
Enter
Enter
Tab
Backspace
- 自动修复有序列表标记
1.4 打印 Markdown 到 HTML
- 命令
Markdown: Print current document to HTML
- 如果您想与他人共享文档,建议使用浏览器(例如 Chrome)将导出的 HTML 打印为 PDF
1.5 GitHub 风味的 Markdown
- 表格格式化程序
注意,在Linux上,键绑定是Ctrl + Shift + I
- 任务列表
1.6 Math
1.7 自动补全
- 图片
- Math 函数
- 引用链接
1.8 其他
- 在选定的文本上粘贴链接(非常方便的超链接插入)
- 用
“Toggle Preview”
覆盖“Open Preview”
键绑定,这意味着您可以使用相同的键绑定(Ctrl + Shift + V
或Ctrl + K V
)关闭预览。
2. 可用的命令
- Markdown: Create Table of Contents
- Markdown: Update Table of Contents
- Markdown: Toggle code span
- Markdown: Print current document to HTML
- Markdown: Toggle math environment
- Markdown: Toggle list
3. 快捷键
TableKey | Command |
---|---|
Ctrl + B | 切换粗体 |
Ctrl + I | 切换斜体 |
Ctrl + Shift + ] | 切换标题 (升级) |
Ctrl + Shift + [ | 切换标题 (降级) |
Ctrl + M | 切换 math 环境 |
Alt + C | 选中/取消选中任务列表项 |
Ctrl + Shift + V | 切换预览 |
Ctrl + K V | 切换预览到侧栏 |
4. 支持的 Settings
TableName | Default | Description |
---|---|---|
markdown.extension.italic.indicator | * | 使用 * 或 _ 来包括斜体 |
markdown.extension.list.indentationSize | adaptive | 对有序列表和无序列表使用不同的缩进大小 |
markdown.extension.orderedList.autoRenumber | true | 编辑时自动修复列表标记 |
markdown.extension.orderedList.marker | ordered | 或者值为 “one” :永远使用 1. 作为有序列表标记 |
markdown.extension.preview.autoShowPreviewToSide | false | 打开 Markdown 文件时自动显示预览。 |
markdown.extension.print.absoluteImgPath | true | 将图像路径转换为绝对路径 |
markdown.extension.print.imgToBase64 | false | 打印到 HTML 时,将图像转换为 base64 |
markdown.extension.print.onFileSave | false | 文件保存时打印到 HTML |
markdown.extension.showExplorer | true | 在资源管理器面板中显示大纲视图 |
markdown.extension.syntax.decorations | true | 向删除线和 code spans 添加装饰 |
markdown.extension.syntax.plainTheme | false | 一个免受干扰的主题 |
markdown.extension.toc.githubCompatibility | false | GitHub 兼容性 |
markdown.extension.toc.downcaseLink | true | 强制 TOC 链接为小写 |
markdown.extension.toc.levels | 1..6 | 控制要在目录中显示的标题级别 |
markdown.extension.toc.orderedList | false | 在目录中使用有序列表 |
markdown.extension.toc.plaintext | false | 只是纯文本 |
markdown.extension.toc.tabSize | auto | 控制 TOC 的缩进大小(auto 或 数字) |
markdown.extension.toc.unorderedList.marker | - | 在目录中使用 - , * 或 + (用于无序列表) |
markdown.extension.toc.updateOnSave | true | 在保存时自动更新目录 |
markdown.extension.katex.macros | {} | KaTeX 宏,例如 { "\\name": "expansion", ... } |
5. Changelog
请参阅 CHANGELOG 查看更多信息。
6. 最新发布版
点击这里下载。
要安装,在命令面板中( ctrl + shift + p
) 执行 Extensions: Install from VSIX...