Skip to content

Commit 7a26739

Browse files
committed
update some doc
1 parent 572e932 commit 7a26739

File tree

8 files changed

+341
-274
lines changed

8 files changed

+341
-274
lines changed

en/plugins/airline.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
# Airline & Themes
22

3-
Airline 可以在 Vim 中显示更友好的状态栏,再配以漂亮的配色,工作更开心。
3+
Airline displays a more user-friendly status bar in Vim, and with a nice color scheme, it's a lot more fun to work with.
44

5-
## 项目地址
5+
## Project address
66

77
- Airline https://github.com/vim-airline/vim-airline
88
- Airline Themes https://github.com/vim-airline/vim-airline-themes
99

10-
## 安装
10+
## Installation
1111

12-
> 添加 `.vimrc` 配置
12+
> Add `.vimrc` configuration.
1313
1414
```vim
15-
" 同时安装两个插件
15+
" Install both plugins at the same time
1616
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
1717
```
1818

19-
> Vim 中执行 `:source ~/.vimrc` 重载配置文件
19+
> Execute `:source ~/.vimrc` in Vim to reload the config file.
2020
>
21-
> 执行 `:PlugInstall` 安装 Airline Aairline Themes 插件
21+
> Execute `:PlugInstall` to install the Airline and Aairline Themes plugins.
2222
>
23-
> `.vimrc` 中添加如下设置使 Airline 生效
23+
> Add the following setting to `.vimrc` to make Airline effective.
2424
25-
```vim
26-
set laststatus=2 " 始终显示状态栏
25+
``vim
26+
set laststatus=2 " Always show status bar
2727

2828
" Airline
29-
let g:airline#extensions#tabline#enabled=1 " 开启 tab
29+
let g:airline#extensions#tabline#enabled=1 " enable tab bar
3030
```
3131
32-
> 重载配置文件使之生效,如果没有效果可以尝试重启 Vim
32+
> Reload the config file to make it work, if that doesn't work try restarting Vim
3333
34-
现在你应该会看到 Vim 下方显示出了一条状态栏,显示信息一般会包含 **当前模式**
35-
**当前文件****文件类型****文件编码**以及**当前行列信息**
34+
You should now see a status bar displayed underneath Vim, displaying information that will typically contain **Current Mode**, **Current File**, **Current File**, **Current File**, **Current File**, and **Current File**.
35+
**Current File**, **File Type**, **File Encoding**, and **Current Column Information**.
3636
37-
因为我们同时安装了 Airline Themes 插件,所以可以通过如下方式设置 Airline 的样式。
37+
Since we also have the Airline Themes plugin installed, we can set the Airline style as follows.
3838
39-
> 执行 `:AirlineTheme simple` 应用 `simple` 样式,或者修改 `.vimrc` 文件,添加如
40-
> 下配置:
39+
> Execute `:AirlineTheme simple` to apply the `simple` style, or modify the `.vimrc` file to add a file like
40+
> The following configuration:
4141
4242
```vim
4343
let g:airline_theme='simple'
4444
```
4545

46-
Airline Themes 包含了非常多的样式,具体可以参考该项目的
47-
[样式文件夹](https://github.com/vim-airline/vim-airline-themes/tree/master/autoload/airline/themes)
48-
其中所列的样式都可以应用。
46+
Airline Themes contains a large number of styles, which can be found in the project's
47+
[Styles folder](https://github.com/vim-airline/vim-airline-themes/tree/master/autoload/airline/themes)
48+
The styles listed there can be applied.
4949

50-
更多细节和效果图可以参考[项目地址](https://github.com/vim-airline/vim-airline)
50+
For more details and renderings, please refer to the [project address](https://github.com/vim-airline/vim-airline).

en/plugins/easyalign.md

Lines changed: 95 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
# EasyAlign
22

3-
EasyAlign 是一款用来做字符对齐的插件,简直是强迫症患者的福音。
3+
EasyAlign is a plugin for doing character alignment that is nothing short of
4+
OCD.
45

5-
## 项目地址
6+
## Project address
67

78
https://github.com/junegunn/vim-easy-align
89

9-
## 安装
10+
## Installation
1011

11-
> 修改 `.vimrc` 配置,在 `call plug#begin()` 后面添加如下配置
12+
> Modify `.vimrc` configuration, add the following configuration after
13+
> `call plug#begin()`
1214
1315
```vim
1416
Plug 'junegunn/vim-easy-align'
1517
```
1618

17-
_注意:Vim 插件管理器的使用请参考[plugin.md](../plugin.md#插件管理)_
19+
_Note: For use of the Vim plugin manager, see [plugin.md](../plugin.md#plugin
20+
management)_
21+
22+
> Run Vim and execute the command `:PlugInstall`, you may get the following
23+
> prompt:
1824
19-
> 运行 Vim 并执行命令 `:PlugInstall`, 可能会得到如下提示:
20-
>
2125
```
2226
1 Updated. Elapsed time: 6.008607 sec.
2327
2 [===]
@@ -28,18 +32,18 @@ _注意:Vim 插件管理器的使用请参考[plugin.md](../plugin.md#插件
2832
7 - vim-easy-align: Resolving deltas: 100% (136/136), done.
2933
```
3034

31-
## 使用
35+
## Usage
3236

33-
### 配置
37+
### Configuration
3438

35-
> 添加 `.vimrc` 配置如下:
39+
> Add `.vimrc` configuration as follows:
3640
3741
```vim
3842
" EasyAlign
39-
xmap ga <Plug>(EasyAlign) " Visual 模式下快捷键
40-
nmap ga <Plug>(EasyAlign) " Normal 模式下快捷键
43+
xmap ga <Plug>(EasyAlign) " The shortcut key in visual mode
44+
nmap ga <Plug>(EasyAlign) " The shortcut key in normal mode
4145
42-
" 配置一些自定义符号
46+
" Configure some custom symbols
4347
let g:easy_align_delimiters = {
4448
\ '>': { 'pattern': '>>\|=>\|>' },
4549
\ '/': {
@@ -66,99 +70,114 @@ let g:easy_align_delimiters = {
6670
\ }
6771
```
6872

69-
### 实验
73+
### Experiment
7074

71-
> 在下面的代码中尝试如下操作:
75+
> Try the following operations in the code below:
7276
7377
```javascript
74-
let a=1;// one
75-
let bcd=test=2; // two
76-
let longword=others= 'some content';// string
78+
let a = 1; // one
79+
let bcd = (test = 2); // two
80+
let longword = (others = "some content"); // string
7781
```
7882

79-
> 首先定位光标到上面代码中的任意一句,按 `gaip<Space>`,应该会得到
80-
> 如下结果
83+
> First locate the cursor to any sentence in the above code, press
84+
> `gaip<Space>`, you should get the following results
8185
8286
```javascript
83-
let a=1;// one
84-
let bcd=test=2; // two
85-
let longword=others= 'some content';// string
87+
let a = 1; // one
88+
let bcd = (test = 2); // two
89+
let longword = (others = "some content"); // string
8690
```
8791

88-
> 保持光标不动,按 `gaip=`,应该会得到如下结果
92+
> Keep the cursor still, press `gaip=`, you should get the following results
8993
9094
```javascript
91-
let a = 1;// one
92-
let bcd = test=2; // two
93-
let longword = others= 'some content';// string
95+
let a = 1; // one
96+
let bcd = (test = 2); // two
97+
let longword = (others = "some content"); // string
9498
```
9599

96-
> 保持光标不动,按 `u`,再按 `gaip*=`,应该会得到如下结果
100+
> Keep the cursor still, press `u`, then press `gaip*=`, you should get the
101+
> following results
97102
98103
```javascript
99-
let a = 1;// one
100-
let bcd = test = 2; // two
101-
let longword = others = 'some content';// string
104+
let a = 1; // one
105+
let bcd = (test = 2); // two
106+
let longword = (others = "some content"); // string
102107
```
103108

104-
下面解释一下按键的意思:
105-
106-
- `gaip `
107-
- `ga` 是开启 EasyAlign 的快捷键,我们在 `.vimrc` 配置文件中定义的
108-
- `ip` 是定义操作区域,可以用任意选择操作命令完成,`ip` 是选择当前段落,如果光
109-
标在代码第一行,则可以用 `2j` 代替 `ip`
110-
- 此时命令区域会出现 `:EasyAlign (_)` 字样,表示等待匹配输入
111-
- 按下 `<Space>` 是要将第一个空格前后对齐
109+
The meaning of the keys is explained below:
110+
111+
- `gaip`
112+
- `ga` is the shortcut to enable EasyAlign, which we defined in the `.vimrc`
113+
configuration file.
114+
- `ip` defines the action area, which can be done with any select action
115+
command, `ip` selects the current paragraph, and if the cursor is on the
116+
first line of code, `2j` can be used instead of `.vimrc`. If the cursor is
117+
on the first line of code, you can use `2j` instead of `ip`.
118+
- At this point, the word `:EasyAlign (_)` will appear in the command area,
119+
indicating that it is waiting for matching input.
120+
- Press `<Space>` to align the first space.
112121
- `gaip=`
113-
- 意义同上,`=` 即将`<等号>`前后对齐
122+
- Same as above, `=` is to align the `<equals sign>`.
114123
- `gaip*=`
115-
- 为了看到更明显的效果,先用 `u` 撤销了前面的操作
116-
- `=` 前面的 `*` 是一个描述符,可以是数字,代表第几个等号,也可以是负数,代表
117-
倒数第几个,也可以是星号,代表所有。
124+
- To see the effect, undo the previous operation with `u`.
125+
- The `=` preceded by `*` is a descriptor that can be a number, representing
126+
the first equals sign, or a negative number, representing the the
127+
penultimate number, or an asterisk for all.
118128

119-
> 如果确定修改好了上面提到的配置,你还可以尝试 `gaip/` 来对齐注释部分,执行后看
120-
> 上去会像下面这样
129+
> If you're sure you've changed the configuration as mentioned above, you can
130+
> also try `gaip/` to align the comment section, and when executed, look at It
131+
> will look like this
121132
122133
```javascript
123-
let a = 1; // one
124-
let bcd = test = 2; // two
125-
let longword = others = 'some content'; // string
134+
let a = 1; // one
135+
let bcd = (test = 2); // two
136+
let longword = (others = "some content"); // string
126137
```
127138

128-
### 匹配符说明
139+
### Explanation of Match Characters
129140

130-
上面提到的 `<Space>` `=` 都是 EasyAlign 中定义好的特殊符号,用来表示某一类特征符
131-
,具体可以参考下表:
141+
The above mentioned `<Space>` `=` are special symbols defined in EasyAlign to
142+
indicate a certain type of character. These symbols are defined in EasyAlign to
143+
represent a certain type of character:
132144

133-
| 按键 | 使用场景说明 |
145+
| Keystrokes | Scenario Description |
134146
| --- | --- |
135-
| `<Space>` | 匹配空白符 |
136-
| `=` | 包含等号的操作符(`=`, `==`, `!=`, `+=`, ... |
137-
| `:` | 应用于 JSON YAML 格式 |
138-
| `.` | 应用于多行点语法调用 |
139-
| `,` | 应用于多行参数列表 |
140-
| `&` | [LaTeX table](https://en.wikibooks.org/wiki/LaTeX/Tables) 进行格式化,匹配 `&` `\\` |
141-
| `#` | 应用于对 Ruby/Python 的注释的对齐 |
142-
| `<Bar>` | Markdown 表格 |
147+
| `<Space>` | Match whitespace |
148+
| `=` | Operators containing the equals sign (`=`, `==`, `! =`, `+=`, ...) |
149+
| `:` | Applies to JSON or YAML formats |
150+
| `.` | Apply to multi-line dot syntax calls |
151+
| `,` | Apply to multi-line parameter lists |
152+
| `&` | Format [LaTeX table](https://en.wikibooks.org/wiki/LaTeX/Tables) to match `&` and `\\\` |
153+
| `#` | Apply alignment to Ruby/Python comments |
154+
| `<Bar>` | Markdown tables |
143155

144-
_注意:上表中提到的 `<Bar>` 键即 `|` _
156+
_Note: The `<Bar>` key mentioned in the table above is the `|` key_.
145157

146-
> 尝试在上表中按 `gaip*|` 对 markdown 表格进行对齐
158+
> Try to align a markdown table by `gaip*|` in the above table.
147159
148160
## Tips
149161

150-
### 对齐方式
162+
### Alignment method
151163

152-
在等待输入匹配符,命令区出现 `:EasyAlign (_)` 字样时,可以按 `<Enter>` 键选择对
153-
齐方向,按一次切换为右对齐,显示 `:EasyAlign[R] (_)`,再按一次切换为居中对齐,显
154-
示为 `:EasyAlign[C] (_)`,再按切换回默认的左对齐,显示也恢复原样。
164+
When you are waiting for a match to be entered and `:EasyAlign (_)` appears in
165+
the command area, you can press the `<Enter>` key to select the alignment
166+
direction. Press once to switch to right alignment and display
167+
`:EasyAlign[R] (_)`, press again to switch to center alignment and display
168+
`:EasyAlign[R] (_)`, and press `<Enter>` to switch to center alignment and
169+
display `:EasyAlign[R] (_)`. toggle to center alignment and display
170+
`:EasyAlign[C] (_)`, then press again to switch back to the default left
171+
alignment, and the display returns to its original state.
155172

156-
> 在上面的 markdown 表格中尝试一下 `gaip<Enter><Enter>*|`
173+
> Try `gaip<Enter><Enter>*|` in the markdown table above.
157174
158-
### 正则匹配
175+
### Regular Matching
159176

160-
在等待输入匹配符时,按快捷键 `<Ctrl-x>` 进入匹配模式,此时输入你需要的匹配特征正
161-
则即可匹配特殊组合。参考下面的文字:
177+
While waiting for a match to be typed, press the shortcut key `<Ctrl-x>` to
178+
enter match mode, and then type in the matching feature you want. The special
179+
combination can be matched by typing in the matching feature you need. See the
180+
following text:
162181

163182
```
164183
Lorem<-ipsum
@@ -169,8 +188,9 @@ eiusmod<-= tempor<=- incididunt
169188
ut <== labore
170189
```
171190

172-
> 尝试输入 `gaip*<Ctrl-x>`,此时进入正则匹配模式,继续输入 `<[-=~]*<Enter>` 会得
173-
> 到如下所示结果。
191+
> Try typing `gaip*<Ctrl-x>`, then it enters the regular matching mode, continue
192+
> typing `<[-=~]*<Enter>` and you will get the following result. The result is
193+
> shown below.
174194
175195
```
176196
Lorem <- ipsum
@@ -181,6 +201,7 @@ eiusmod <-= tempor <=- incididunt
181201
ut <== labore
182202
```
183203

184-
### 更多参考
204+
### More references
185205

186-
更多内容请参考[项目页](https://github.com/junegunn/vim-easy-align)的介绍
206+
For more references, please refer to the introduction of
207+
[project page](https://github.com/junegunn/vim-easy-align)

en/plugins/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# 插件推荐
1+
# Plugin Recommendations
22

33
- [NERDTree](nerdtree.md)
44

5-
NERDTree Vim 中的文件浏览插件,可以通过命令打开/关闭目录树并浏览/打开文件。
5+
NERDTree is a file browsing plugin in Vim that allows you to open/close directory trees and browse/open files with commands.
66

77
- [EasyAlign](easyalign.md)
88

9-
EasyAlign 是一款用来做字符对齐的插件,简直是强迫症患者的福音。
9+
EasyAlign is a plugin to do character alignment, it's a boon for OCD people.
1010

1111
- [Airline & Themes](airline.md)
1212

13-
Airline 可以在 Vim 中显示更友好的状态栏,再配以漂亮的配色,工作更开心。
13+
Airline displays a more friendly status bar in Vim, and with a nice color scheme, it's a lot more fun to work with.
1414

1515
- [surround.vim](surround.md)
1616

17-
成对 添加、替换、删除 `引号``括号` 以及`XML 标签`
17+
Pairwise add, replace, delete `quotes`, `braces` and `XML tags`.

0 commit comments

Comments
 (0)