update README

This commit is contained in:
cdf 2020-11-20 08:39:27 +08:00
parent c9f4316bd5
commit 25d9b6a4ae
2 changed files with 139 additions and 119 deletions

View File

@ -22,8 +22,8 @@ bash -c "`curl -fsSL https://raw.githubusercontent.com/ruilisi/dotfiles/master/i
**Scroll Mode** **Scroll Mode**
`PRE [`: 进入滚动模式 `PRE [`: 进入滚动模式
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`Enter` | 复制文本 | `Enter` | 复制文本 |
`]` | 复制滚动模式下的内容 | `]` | 复制滚动模式下的内容 |
@ -34,45 +34,45 @@ Shortcut | Function |
Normal Mode Normal Mode
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`C-v` | 视图模式 | `C-v` | 视图模式
`C-x C-v`| 从系统粘贴板复制内容 | `C-x C-v`| 从系统粘贴板复制内容
`<L>tp` | 切换粘贴| `<L>tp` | 切换粘贴
Visual Mode Visual Mode
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`C-c` | 复制 | `C-c` | 复制
**Defined by Vim** **Defined by Vim**
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`o` |光标下方插入新的一行| `o` |光标下方插入新的一行
`S-o` |光标上方插入新的一行| `O` |光标上方插入新的一行
`0` |跳至行首| `0` |跳至行首
`$` |跳至行尾| `$` |跳至行尾
`v` |进入字符选择模式| `v` |进入字符选择模式
`x` |删除选中的内容| `x` |删除选中的内容
`V` |进入整行选中模式| `V` |进入整行选中模式
`y` |复制选中的内容| `y` |复制选中的内容
`p` |粘贴选中的内容| `p` |粘贴选中的内容
`Ctrl+u` |往上翻页| `Ctrl+u` |往上翻页
`Ctrl+d` |往下翻页| `Ctrl+d` |往下翻页
`:w` |保存文件| `:w` |保存文件
`:q` |退出Vim| `:q` |退出Vim
`:/ keyword`|搜索| `:/ keyword`|搜索
`n` |跳到下一个搜索到的内容| `n` |跳到下一个搜索到的内容
`S-N` |跳到上一个搜索到的内容| `N` |跳到上一个搜索到的内容
`w` |往前移动一个单词| `w` |往前移动一个单词
`b` |往后移动一个单词| `b` |往后移动一个单词
`gg` |移动到文档顶部| `gg` |移动到文档顶部
`S-G` |移动到文档底部| `G` |移动到文档底部
`Ctrl+\` |显示(隐藏)文件树| `Ctrl+\` |显示(隐藏)文件树
`[spc] c l`|快速注释或解除注释行| `[spc] c l`|快速注释或解除注释行
`%s key1/key2/g`|将文档中的key1替换为key2| `%s key1/key2/g`|将文档中的key1替换为key2
`S-V` | 选中文本 | `S-V` | 选中文本
#### vim && markdown #### vim && markdown
* 安装 `prettier`: `yarn global add prettier``npm install --global prettier` * 安装 `prettier`: `yarn global add prettier``npm install --global prettier`
@ -197,21 +197,30 @@ YADR会接管你的`~/.gitconfig`, 所以如果你想存储你的git用户名及
我们推荐在这个文件里设置你的用户信息是。另外,你可以将你的环境变量恰当地设置在你的 `~/.secrets`里。 我们推荐在这个文件里设置你的用户信息是。另外,你可以将你的环境变量恰当地设置在你的 `~/.secrets`里。
- `git l``gl`- 可用度更高的git log 快捷键 | 命令
- `git b``gb`- 含有上一个commit摘要的分支列表 :-------:|:--------:
- `git r` - 有关源列表的信息 `ga` |`git add`
- `git t``gt`- 有关标签列表的信息 `gb` |`git branch`
- `git nb``gnb`- 正如checkoub -b建立一个新的分支 `gbc` or `gnb` |`git checkout -b`
- `git cp``gcp`- cherry-pick -x (显示那些被cherrypick过的) `gbs` |`git show-branch`
- `git simple` - 一个更加简洁的构建changelogs的命令 `gc` |`git commit --verbose`
- `git recent-branches` - 帮助告诉你最近使用过的分支 `gco` |`git checkout`
- `git unstage` / `guns` (从index上移除) 以及 `git uncommit` / `gunc` (撤销至上一个commit之前的时刻 - 如果代码已经push过这个操作将会非常危险) 别名 `gcp` |`git cherry-pick --ff`
- 一些合情合理的默认设置, 例如优化合并分支信息, 只推送当前分支, 删除状态提示, 以及在diff过程中使用易于记忆的前缀: (i)ndex, (w)ork tree, (c)ommit and (o)bject `gd` |`git diff`
- 微微优化了diff的颜色 `gf` |`git fetch`
- `gdmb` (g)it (d)elete (m)erged (b)ranches - 删除所有已经合并到当前分支的分支 `gfc` |`git clone`
- `Gdiff`显示代码前后更改 `gfm` |`git pull`
`gfr` |`git pull --rebase`
`gl` |`git log`
`gpc` |`git push --set-upstream origin "$(git-branch-current 2> /dev/null)"`
`gr` |`git rebase`
`gra` |`git rebase --abort`
`grc` |`git rebase --continue`
`grs` |`git rebase --skip`
`gsd` |`git stash drop`
`gsl` |`git stash list`
`gsp` |`git stash pop`
`gst` |`git stash`
##### vim-gitgutter ##### vim-gitgutter
@ -266,15 +275,15 @@ YADR会接管你的`~/.gitconfig`, 所以如果你想存储你的git用户名及
- `h`(jkl): 左(下上右)移窗格 - `h`(jkl): 左(下上右)移窗格
- `c-a c`: 创建一个新的窗区 - `C-a c`: 创建一个新的窗区
- `c-a s`: 上下分割窗格 - `C-a s`: 上下分割窗格
- `c-a v`: 左右分割窗格 - `C-a v`: 左右分割窗格
- `c-a x`: 删除窗格 - `C-a x`: 删除窗格
- `c-a H`(JKL): 左(下上右)移分割线 - `C-a H`(JKL): 左(下上右)移分割线
- `c-a ,`: 输入Tmux命令行模式 - `C-a ,`: 输入Tmux命令行模式
- `c-a d`: 退出Session - `C-a d`: 退出Session
- `c-a D`: 选择退出Session - `C-a D`: 选择退出Session
- `c-a 1`(23456789): 进入窗区1(23456789) - `C-a 1`(23456789): 进入窗区1(23456789)

129
README.md
View File

@ -33,39 +33,39 @@ Shortcut | Function |
**Defined by Us** **Defined by Us**
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`C-v` | Enter visual mode | `C-v` | Enter visual mode
`C-x C-v` | Paste text from system clipboard | `C-x C-v` | Paste text from system clipboard
`\<L\>tp` |toggle paste| `\<L\>tp` |toggle paste
**Defined by Vim** **Defined by Vim**
Shortcut | Function | Shortcut | Function
:-------:|:--------:| :-------:|:--------:
`o` |insert a new line below| `o` |insert a new line below
`S-o` |insert a new line above| `O` |insert a new line above
`0` |go to the beginning of the line| `0` |go to the beginning of the line
`$` |go to the end of the line| `$` |go to the end of the line
`v` |enter character selection mode| `v` |enter character selection mode
`x` |delete selected content| `x` |delete selected content
`V` |enter line selection mode| `V` |enter line selection mode
`y` |copy selected content| `y` |copy selected content
`p` |paste copied content| `p` |paste copied content
`Ctrl+u` |page up| `Ctrl+u` |page up
`Ctrl+d` |page down| `Ctrl+d` |page down
`:w` |save file| `:w` |save file
`:q` |quit vim| `:q` |quit vim
`:/ keyword`|search| `w` |move forward one word
`n` |go to the next content| `b` |move back one word
`S-N` |go to the previous content| `gg` |move to the top of the file
`w` |move forward one word| `G` |move to the bottom of the file
`b` |move back one word| `Ctrl+\` |show(hide) the Buffers
`gg` |move to the top of the file| `:/ keyword`|search
`S-G` |move to the bottom of the file| `n` |go to the next content
`Ctrl+\` |show(hide) the Buffers| `N` |go to the previous content
`[spc] c l`|(un)comment the selected line| `[spc] c l`|(un)comment the selected line
`%s key1/key2/g`|replace Key1 with Key2| `:%s/key1/key2/g`| replae Key1 with Key2
#### vim && markdown #### vim && markdown
* Install `prettier`: `yarn global add prettier` or `npm install --global prettier` * Install `prettier`: `yarn global add prettier` or `npm install --global prettier`
@ -180,19 +180,30 @@ YADR will take over your ~/.gitconfig, so if you want to store your git username
We recommend setting your user information in this file. In addition, you can set your environment variables appropriately in your ~/.secrets. We recommend setting your user information in this file. In addition, you can set your environment variables appropriately in your ~/.secrets.
- `git l` or `gl`- More effective git log Shortcut | Alias
- `git b` or `gb`- A list of branches containing the summary of the previous commit :-------:|:--------:
- `git r` - Information about the source list `ga` |`git add`
- `git t` or `gt`- Information about the tag list `gb` |`git branch`
- `git nb` or `gnb`- Just like checkoub -b, create a new branch `gbc` or `gnb` |`git checkout -b`
- `git cp` or `gcp`- cherry-pick -x (Show those branches which have been cherrypicked) `gbs` |`git show-branch`
- `git simple` - A more concise command to build changelogs `gc` |`git commit --verbose`
- `git recent-branches` - Show you about the branches you have used recently `gco` |`git checkout`
- `git unstage` / `guns` (remove from index) and `git uncommit` / `gunc` (Revoke to the moment before the last commit-if the code has been pushed, this operation will be very dangerous) Alias `gcp` |`git cherry-pick --ff`
- Some reasonable default settings, such as optimizing merged branch information, pushing only the current branch, deleting status prompts, and using easy-to-remember prefixes in the diff process: (i)ndex, (w)ork tree, (c)ommit and (o)bject `gd` |`git diff`
- Slightly optimized the color of diff `gf` |`git fetch`
- `gdmb` (g)it (d)elete (m)erged (b)ranches - Delete all branches that have been merged into the current branch `gfc` |`git clone`
- `Gdiff` Display changes `gfm` |`git pull`
`gfr` |`git pull --rebase`
`gl` |`git log`
`gpc` |`git push --set-upstream origin "$(git-branch-current 2> /dev/null)"`
`gr` |`git rebase`
`gra` |`git rebase --abort`
`grc` |`git rebase --continue`
`grs` |`git rebase --skip`
`gsd` |`git stash drop`
`gsl` |`git stash list`
`gsp` |`git stash pop`
`gst` |`git stash`
@ -242,25 +253,25 @@ Some of the most useful commands provided by YADR are listed below. This is not
#### Tmux #### Tmux
C refer to Ctrl
Shortcut | Function
:-------:|:--------:
`h(jkl)` |`←(↓↑→)Move pane`
`C-a c` |`Craete a new pane`
`C-a s` |`Split panes up and down`
`C-a v` |`Split panes left and right`
`C-a x` |`Kill pane`
`C-a H(JKL)` |`←(↓↑→)Move dividing line`
`C-a ,` |`Switch to Tmux command line mode`
`C-a d` |`Exit Session`
`C-a D` |`Exit Session`
`C-a 1` |`Enter pane 1`
- `h`(jkl): ←(↓↑→)move pane #### Index
- `c-a c`: Create a new pane
- `c-a s`: Split panes up and down
- `c-a v`: Split panes left and right
- `c-a x`: Kill pane
- `c-a H`(JKL): ←(↓↑→)Move dividing line
- `c-a ,`: Switch to Tmux command line mode
- `c-a d`: Exit Session
- `c-a D`: Choose to exit Session
- `c-a 1`(23456789): Enter pane 1(23456789)
#### Code search
#### File index
#### 导航
#### 搜索/代码导航
#### 文件导航
#### A better way to press keys for common editing commands #### A better way to press keys for common editing commands