feat: add sublime-text.md
cheatsheet.
This commit is contained in:
parent
9a5e90d6e6
commit
c19283b71f
@ -31,6 +31,7 @@ Quick Reference
|
||||
[package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132/var(\-\-bg\-opacity));-->
|
||||
[Semver](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141/var(\-\-bg\-opacity));-->
|
||||
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0/var(\-\-bg\-opacity));-->
|
||||
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0/var(\-\-bg\-opacity));-->
|
||||
[Jest](./docs/jest.md)<!--rehype:style=background: rgb(153 66 91/var(\-\-bg\-opacity));-->
|
||||
[RegEx](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155/var(\-\-bg\-opacity));-->
|
||||
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230/var(\-\-bg\-opacity));-->
|
||||
|
150
docs/sublime-text.md
Normal file
150
docs/sublime-text.md
Normal file
@ -0,0 +1,150 @@
|
||||
Sublime Text 备忘清单
|
||||
===
|
||||
|
||||
这个 [Sublime Text](https://www.sublimetext.com/) 快速参考备忘单显示了它的键盘快捷键和命令。
|
||||
|
||||
## 快捷键
|
||||
|
||||
### 文本编辑初学者
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
[Sublime Text](https://www.sublimetext.com/) 是一个用于代码、标记的复杂文本编辑器。
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌘ D` | 选择单词(重复包括单词的下一个实例)
|
||||
`⌘ L` | 选择行(重复以包括下一行)
|
||||
`⌘ ⇧ L` | 将选择拆分为多行(多行编辑)
|
||||
`⌘ ⇧ A` | 选择标签内的文本(重复以展开)
|
||||
`⌃ ⇧ M` | 选择大括号或尖括号(重复展开)
|
||||
`⌘ X` | 剪切一行
|
||||
`⌃ M` | 转到匹配的括号
|
||||
`⌃ ↩︎` or `↩︎` | 在后面插入行
|
||||
`⌘ ↵` | 在后面插入行
|
||||
`⇧ ⌘ ↵` | 在前面插入行
|
||||
`⇧ ⌥ ▲` | 选择当前行光标之前
|
||||
`⇧ ⌥ ▼` | 选择当前行光标之后
|
||||
`⇧ ⌃ M` | 选择当前括号的所有内容
|
||||
`⌥ ⇠/⇢` | 进行逐词移动,相应的
|
||||
`⌥ ⇧ ⇠/⇢` | 进行逐词选择
|
||||
`⌘ U` | 返回到历史光标位置(撤销)
|
||||
`⌃ M` | 快速的在起始括号和结尾括号间切换
|
||||
`⌃ ⇧ M` | 则可以快速选择括号间的内容
|
||||
`⌃ ⇧ J` | 对于缩进型语言(例如Python)可以使用
|
||||
`⌃ ⌘ D` | 复制整行
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
查看:[Sublime Text](https://www.sublimetext.com/) 官网
|
||||
|
||||
### 代码折叠
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌘ Alt [` | 折叠最近的块
|
||||
`⌘ Alt ]` | 展开最近的块
|
||||
`⌘ K ⌘ 1` | 折叠所有第一级代码块
|
||||
`⌘ K ⌘ 2` | 折叠所有二级代码块
|
||||
`⌘ K ⌘ 3` | 折叠所有第三级代码块(等)
|
||||
`⌘ K ⌘ T` | 折叠所有 HTML 属性
|
||||
`⌘ K ⌘ 0` | 展开一切
|
||||
`⌘ K 0` | 代码展开
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### macOS 键盘符号
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌘` | Command()
|
||||
`⌃` | Control
|
||||
`⌥` | Option(alt)
|
||||
`⇧` | Shift
|
||||
`⇪` | Caps Lock(大写)
|
||||
`fn` | 功能键就是fn
|
||||
`↩︎` | return/Enter
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌘ ⇧ D` | 复制当前行/选择
|
||||
`⌘ ⇧ K` | 删除当前行/选择
|
||||
`⇧ del` | 删除当前行/选择
|
||||
`⌘ ⇧ ▲` | 移动队列
|
||||
`⌘ ⇧ ▼` | 下移一行
|
||||
`⌘ ▼/▲`| 移动到首行/尾行
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 转到
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌘ P` | 去任何地方
|
||||
`⌘ G` | 转到行号
|
||||
`⌘ R` | 转到符号
|
||||
`⌘ P, :` | 转到行号(`:`之后输入数字)
|
||||
`⌘ P, #` | 转到并列出字符串模糊匹配(`#`之后输入字符)
|
||||
`⌘ P, @` | 转到并列出符号(`@`之后开始输入符号名称)
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 选择(Selecting)
|
||||
|
||||
- `⌘ + D`
|
||||
选择光标所在的单词,并高亮该词出现的所有位置
|
||||
- `⌘ + D`
|
||||
择该词出现的下一个位置
|
||||
- `⌘ + U` 进行回退,使用Esc退
|
||||
<!--rehype:className=style-timeline shortcuts-->
|
||||
|
||||
----
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌃ K` / `⌘ K K` | 从光标处删除到行末尾
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 拆分窗口
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⇧ ⌥ 2` | 将视图拆分为两列
|
||||
`⇧ ⌥ 1` | 将视图还原为单列
|
||||
`⇧ ⌥ 5` | 将视图设置为网格(4 组)
|
||||
`⌃ 2` | 跳到第 2 组
|
||||
`⇧ ⌃ 2` | 将文件移动到组 2
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 文本操作
|
||||
|
||||
快捷键 | 说明
|
||||
:- | -
|
||||
`⌃ K ⌃ L` | 转换为小写
|
||||
`⌃ K ⌃ U` | 转换为大写
|
||||
`⇧ ⌃ K` | 删除行
|
||||
`⌃BACKSPACE` | 向后删除单词
|
||||
`⌃DEL` | 删除单词转发
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 命令行中启动编辑器
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```bash
|
||||
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl\
|
||||
/usr/local/bin/subl
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
#### 在命令行中使用 **subl** 命令
|
||||
|
||||
```bash
|
||||
$ subl .
|
||||
$ subl README.md
|
||||
```
|
||||
|
||||
软链放到这个目录 `/usr/local/bin/subl`,这是因为 `Rootless` 机制,不能存放到 ~~`/usr/bin/subl`~~ 位置。
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
- [Sublime Text 官网](https://www.sublimetext.com/) _(sublimetext.com)_
|
||||
- [Sublime 编辑器快捷键](https://jaywcjlove.github.io/handbook/Shortcuts/sublime.html) _(jaywcjlove.github.io)_
|
3
scripts/assets/sublime-text.svg
Normal file
3
scripts/assets/sublime-text.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
|
||||
<path d="M20.953.004a.397.397 0 0 0-.18.017L3.225 5.585c-.175.055-.323.214-.402.398a.42.42 0 0 0-.06.22v5.726a.42.42 0 0 0 .06.22c.079.183.227.341.402.397l7.454 2.364-7.454 2.363c-.255.08-.463.374-.463.655v5.688c0 .282.208.444.463.363l17.55-5.565c.237-.075.426-.336.452-.6.003-.022.013-.04.013-.065V12.06c0-.281-.208-.575-.463-.656L13.4 9.065l7.375-2.339c.255-.08.462-.375.462-.656V.384c0-.211-.117-.355-.283-.38z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 532 B |
@ -848,6 +848,9 @@ body:not(.home) .h2wrap > h2 a::after {
|
||||
.home-card {
|
||||
grid-template-columns: repeat(4,minmax(0,1fr));
|
||||
}
|
||||
.wrap-header.h3wrap > .wrap-body {
|
||||
overflow: initial;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 375px) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user