Skip to content

Commit b9aea83

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents 1c80f7a + 72c2b54 commit b9aea83

35 files changed

+407
-403
lines changed

en/Tutorial/Language/Snippets.md

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,62 @@
1-
# 代码块
1+
# Snippets
22

3-
## 概述
3+
## Overview
44

5-
代码块是快速开发的利器。简单的敲几个字母,回车,就能生成大段代码。
5+
Snippets are a powerful tool for rapid development. Simply type a few letters and press Enter to generate a large piece of code.
66

7-
比如我们经常会敲if...else结构,在HBuilderX中,只需敲`ife`回车,就能直接生成相应的代码结构。
7+
For example, we often type the `if...else` structure. In HBuilderX, you can directly generate the corresponding code structure by hitting `ife` and enter.
88

9-
`ife`
9+
input `ife`
1010

1111
<img src="/static/snapshots/tutorial/snippets_3.png" style="zoom: 90%;" />
1212

13-
回车后生成if结构体
13+
Generate if structure after carriage return.
1414

1515
<img src="/static/snapshots/tutorial/snippets_4.png" style="zoom: 90%;" />
1616

17-
## 常用代码块列表
17+
## List of commonly used code blocks
1818

19-
**通用js代码块**
19+
**JavaScript Snippets**
2020

21-
- iff :简单if
22-
- forr :for循环结构体
23-
- fori :for循环结构体并包含i
24-
- funn:函数
25-
- funa:匿名函数
26-
- clog:打印日志
27-
- clogvar:打印变量命名和值
21+
- iff
22+
- forr :for loop structure
23+
- fori :for loop structure and contains i
24+
- funn: function
25+
- funa: anonymous function
26+
- clog: print log
27+
- clogvar: print variable name and value
2828

29-
**dom代码块**
29+
**dom Snippets**
3030

3131
- dg :document.getElementById
3232
- dl :$("")
3333

34-
**vue代码块**
34+
**vue Snippets**
3535

36-
敲v,即可拉出各种vue代码块
36+
Enter `v`, You can pull out various vue Snippets.
3737

38-
**uni-app代码块**
38+
**uni-app Snippets**
3939

40-
敲u,即可拉出各种uni-app代码块
41-
还有ifios、ifandroid,这2个平台判断代码块(HBuilderX 1.9.10+)
40+
Enter `u`, You can pull out various uniapp Snippets.
4241

43-
## 代码块设置
42+
## Snippets settings
4443

45-
HBuilderX已经内置了大量常用的代码块,熟悉这些代码块,对于提高编程效率有重要帮助。
44+
HBuilderX has built-in a large number of commonly used Snippets. Familiarity with these Snippets is important to improve programming efficiency.
4645

47-
查看内建的代码块,点击菜单-工具-代码块设置,选择你要查看的语言的代码块。
46+
To view the built-in Snippets, click [Menu-Tools-Snippets Settings], and select the Snippets of the language you want to view.
4847

49-
<img src="/static/snapshots/tutorial/snippets_1.png" style="zoom: 90%;" />
48+
<img src="/static/snapshots/tutorial/menu_tool/menu_snippets_en.png" class="hd-img" />
5049

51-
打开的界面中,左侧即是预置的代码块,右侧是开发者可以自己扩展代码块的地方。
50+
In the opened interface, the left side is the preset Snippets, and the right side is the place where developers can extend the Snippets by themselves.
5251

53-
<img src="/static/snapshots/tutorial/snippets_2.png" style="zoom: 80%;" />
52+
<img src="/static/snapshots/tutorial/menu_tool/snippets_custom_en.png" class="hd-img" />
5453

5554

56-
## 自定义代码块
55+
## Custom Snippets
5756

58-
自定义代码块都是配置json文件中的,直接来一个js例子吧,上述`ife`代码块的配置如下:
57+
Custom Snippets are in the configuration json file.
58+
59+
js Snippets example: the configuration of the above `ife` Snippets is as follows:
5960

6061
```json
6162
{
@@ -73,50 +74,50 @@ HBuilderX已经内置了大量常用的代码块,熟悉这些代码块,对
7374
}
7475
```
7576

76-
### 代码块配置格式说明
77+
### Snippets Format description
7778

78-
HBuilderX使用json定义代码块的格式,兼容vscode的代码块格式,也就是你可以把vscode里已经配置的自定义代码块方便的挪到HBuilderX中使用。
79+
HBuilderX uses json to define the format of the Snippets, which is compatible with the Snippets format of vscode, that is, you can easily move the custom Snippets that has been configured in vscode to HBuilderX for use.
7980

8081

81-
|配置项 |说明 |
82-
|-- |-- |
83-
|key |代码块显示名称,显示在代码助手列表中的名字。key是不能重复的。上面例子中`"if ... else"`就是一个`key` |
84-
|prefix |代码块的触发字符,就是敲什么字母可以激活这个代码块。 |
85-
|body |代码块的内容 |
86-
|triggerAssist |`true`表示该代码块输入到文档后立即在第一个`tabstop`上触发代码提示,拉出代码助手,默认为`false` |
87-
| project |将代码块控制在指定项目类型下生效。可取值有:`uni-app``Web``App``Wap2App`<br/>`Web`指普通项目,`App`指5+App项目。如果不设置,则该代码块在所有项目类型下均生效。<br/>比如:`"project": "uni-app"`,代表这个代码块仅在uni-app项目下生效。<br/>如需设置多种项目类型,用逗号分隔。比如:`"project": "uni-app,App"` |
82+
|Configuration item |Description |
83+
|-- |-- |
84+
|key |Snippets display name, the name displayed in the code assistant list. The key cannot be repeated.|
85+
|prefix |Trigger character of Snippets |
86+
|body |The content of the Snippets. |
87+
|triggerAssist |True means that the code prompt is triggered on the first tabtop immediately after the code block is entered into the document, and the code assistant is pulled out. The default is false. |
88+
|project |Control the code block to take effect under the specified project type. Possible values are: `uni-app`, `Web`, `App`, `Wap2App`.<br/>To set multiple item types, separate them with commas. For example: `"project": "uni-app,App"` |
8889

89-
**配置项body详细说明:**
90+
**Body description:**
9091

91-
- `$1` 表示代码块输入后光标的所在位置。如需要多光标,就在多个地方配置`$1`;如该位置有预置数据且需要选中,则写法是`${1:selectedtext}`;这里还支持下拉候选菜单,多选项即下拉候选列表使用`${1:foo1/foo2/foo3}`
92-
- `$2` 表示代码块输入后再次按tab后光标的切换位置`tabstops`(代码块展开后按tab可以跳到下一个`tabstop`,在HBuilderX中看到类似绿色光标的不闪的竖线,就可以按tab或回车跳转光标过去)
93-
- `$0`代表代码块输入后最终光标的所在位置(也可以按回车直接跳过去)。
92+
- `$1` The position of the cursor after the code block is entered. If you need multiple cursors, configure `$1` in multiple places; if there are preset data at this location and need to be selected, the writing method is `${1:selectedtext}`; here also supports drop-down candidate menus, multiple options are drop-down candidates The list uses `${1:foo1/foo2/foo3}`
93+
- `$2` After the code block is entered, the cursor switch position after pressing tab again.
94+
- `$0` The final cursor position after the code block is entered.
9495

95-
特别说明
96-
1. **双引号使用`\"`转义**
97-
2. **换行使用多个数组表示,每个行一个数组,用`双引号`包围,并用`逗号`分隔**
98-
3. **缩进需要用`\t`表示,不能直接输入缩进或空格!**
96+
Remark
97+
1. **Double quotes are escaped with `\"`**
98+
2. **Line breaks are represented by multiple arrays, one array per line, surrounded by `double quotes` and separated by `commas`**
99+
3. **The indentation needs to be indicated by `\t`, you cannot directly enter the indentation or spaces! **
99100

100101

101-
### 注意事项
102+
### Matters needing attention
102103

103-
1. 每个代码块以`key`为主键,多个代码块需要`逗号`分隔。
104-
2. 如果json语法不合法,编辑器状态栏会弹出错误信息,json中会画出红波浪线,请注意修正。
104+
1. Each code block uses `key` as the main key, and multiple code blocks need to be separated by `commas`.
105+
2. If the json syntax is illegal, an error message will pop up in the editor status bar, and a red wavy line will be drawn in the json, please pay attention to the correction.
105106

106-
## 注释模板同步时间
107+
## Comment template For Datetime
107108

108-
> HBuilderX 2.7.5+版本起,支持主持注释模板同步时间
109+
> From HBuilderX 2.7.5+ version, it supports the synchronization time of host annotation template
109110
110-
点击菜单【工具】【代码块设置】【javascript代码块】,输入如下内容:
111+
Click the menu [Tools - Snippets settings - javascript snippets], and enter the following:
111112

112113
```
113114
{
114115
"method-annotation": {
115116
"prefix": "anno",
116117
"body": [
117118
"/**",
118-
" * 方法说明",
119-
" * author: 佚名",
119+
" * Method description",
120+
" * author: author name",
120121
" * description: ",
121122
" * @param $1",
122123
" * @return $2",

en/Tutorial/Language/markdown.md

Lines changed: 43 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,68 @@
1-
HBuilderX对md提供了强大支持,是有史以来最强大、最简洁、最高效的markdown书写工具。
1+
# MarkDown
22

3-
下载HBuilderX,点菜单帮助-markdown语法说明,会打开一个md文件,里面详细演示了HBuilderX对markdown的强化。
4-
**推荐在那里实际体验**
3+
HBuilderX provides powerful support for md and is the most powerful, concise and efficient markdown writing tool ever.
54

6-
## 强大的Emmet支持、及快捷键支持
5+
Download HBuilderX, click the menu help-markdown syntax description, it will open an md file, which demonstrates the enhancement of markdown by HBuilderX in detail.
6+
**Recommended for actual experience there**
77

8-
- 标题: 敲`h2+Tab`即可生成二级标题
9-
- 图片: `img`后敲`Tab`
10-
- 链接: `a`后敲`Tab`
11-
- 表格: `table3*3`后敲`Tab`,表示生成3行3列的表格,行首生效
12-
- 分割线: `hr`后敲`Tab`
13-
- 代码块: `code`后敲`Tab`,行首生效
14-
- `day`后敲`Tab`,当前日期。注意day需在行首或前面有空格
15-
- `time`后敲`Tab`,当前时间。注意time需在行首或前面有空格
16-
- 文字加粗: `b`后敲`Tab`
17-
- 文字倾斜: `i`后敲`Tab`
18-
- 注释:快捷键`Ctrl+/`快速插入注释
8+
## Powerful Emmet support and shortcut key support
199

20-
## 强大的智能粘贴
10+
- **title**: hit `h2+Tab` to generate a secondary title
11+
- **image**: Hit `Tab` after `img`
12+
- **link**: Hit `Tab` after `a`
13+
- **table**: Knock on `Tab` after `table3*3`, it means that a table with 3 rows and 3 columns is generated, and the first row takes effect
14+
- **split line**: Hit `Tab` after `hr`
15+
- **code block**: Hit `Tab` after `code`, the beginning of the line will take effect
16+
- Press `Tab` after `day`, the current date. Note that day must have a space at the beginning or in front of the line
17+
- Press `Tab` after `time`, the current time. Note that time must have a space at the beginning or in front of the line
18+
- **Bold text**: press `Tab` after `b`
19+
- **The text is slanted**: press `Tab` after `i`
20+
- **Comment**: Shortcut key `Ctrl+/` to quickly insert a comment
2121

22-
- 图片: 支持智能粘贴,粘贴剪切板里的图形时会自动保存为本md文档的附件
23-
- 链接: 支持智能粘贴,粘贴URL会自动变成超链接格式,粘贴本地文件进来也会自动创建引用链接
24-
- 表格: 支持从excel、wps、word、number的表格中复制粘贴表格进来
22+
## Powerful smart paste
2523

26-
## 强大的智能双击
24+
- **Image**: Support smart paste, when you paste the graphics in the clipboard, it will be automatically saved as an attachment to the md document
25+
- **Link**: Supports smart pasting, the pasted URL will automatically become a hyperlink format, and the local file will automatically create a reference link when you paste it in
26+
- **Table**: Support copy and paste tables from excel, wps, word, number tables
2727

28-
- 标题: 双击`#号`可选中整个标题段落
29-
- 有序列表: `双击`前面的数字,可重新对数字排序,修正序号错误
30-
- 代码块: `双击`语法区开头,即`!左侧`,选中包含定义符的整段文字
31-
- 注释: `双击`注释首尾的定义符,选中整段注释
32-
- 链接: `双击`语法区开头,即`[`左侧,选中包含定义符的整段文字
33-
- 图片: `双击`语法区开头,即`!`左侧,选中包含定义符的整段文字
28+
## Powerful smart double click
3429

35-
## 强大的整理功能
30+
- **Title**: Double-click the `# sign` to select the entire title paragraph
31+
- **Ordered list**: `Double click` the number in front of it, you can re-sort the numbers and fix the serial number error
32+
- **Code block**: `Double-click the beginning of the `grammar area, that is, the left side of `!`, select the entire text containing the delimiter
33+
- **Comment**: `Double click` the delimiter at the beginning and end of the comment to select the whole comment
34+
- **Link**: `Double-click` the beginning of the grammar area, which is to the left of `[`, select the entire text containing the delimiter
35+
- **image**: `Double-click` the beginning of the grammar area, which is to the left of `!`, select the entire text containing the delimiter
3636

37-
- 表格:支持`Ctrl+K`可以自动整理表格格式
37+
## Powerful Format function
38+
39+
Table: Support `Ctrl+K` to automatically organize the table format
3840

3941
<img src="/static/snapshots/tutorial/markdown_table_format.gif" style="border: 1px solid #eee;"/>
4042

41-
## 直观的文档结构图
43+
## Intuitive document outline
4244

43-
HBuilderX Markdown文件,也支持显示文档结构图(大纲视图)。
45+
HBuilderX Markdown file also supports displaying document outline view.
4446

45-
windows快捷键: `Alt+w`; MacOSX快捷键:`Ctrl+w`
47+
Windows shortcut key: `Alt+w`; MacOSX shortcut key: `Ctrl+w`
4648

4749
<img src="/static/snapshots/tutorial/markdown_outline.jpg" style="zoom: 45%;border-radius: 20px;border: 1px solid #eee;"/>
4850

49-
## 实用的任务列表
50-
51-
任务列表非常实用,管理待办、已办非常便利。
52-
53-
- [ ] 任务列表-未完成任务 `快捷键:Ctrl+Alt+[`
54-
- [x] 任务列表-已完成任务 `快捷键:Ctrl+Alt+]`
55-
56-
## markdown一键分享
57-
58-
使用markdown也有一个重要的问题,那就是图片的存储,markdown文件要用到图片时必须是一个链接,在不使用图床的情况下,编辑上传图片太麻烦。
59-
60-
HBuilderX 2.8.8, 推出了 MarkDown一键分享功能。使用uniCloud作为图床 什么是[uniCloud](https://uniapp.dcloud.io/uniCloud/README),可靠、安全、简单易用、免费。
61-
62-
markdown一键分享,顾名思义是在HBuilderX中写好的markdown文档,可以简单通过编辑器右键【一键分享】菜单或者快捷键上传到云端,并生成分享链接,并且完全免费!
63-
64-
文档引用到本地图片会自动解析一并上传到云端。
65-
66-
[markdown一键分享](/Tutorial/extension/markdown_share)
67-
68-
## 云同步笔记的技巧
69-
70-
#### 云同步工具
71-
72-
首先推荐一个云同步工具,微软的onedrive。[https://skydrive.live.com/](https://skydrive.live.com/)
73-
74-
在dropbox被墙后,onedrive成为最佳选择,免费、稳定、安全、多平台。
75-
76-
win10平台自带onedrive客户端,其他平台可在上述网址下载安装。(一定要安装客户端,web版也需要翻墙)
77-
78-
配置onedrive账户后,在本机我的电脑上会出现一个onedrive文件夹,在里面新建一个“note”的文件夹(名字可自定),然后把HBuilderX写的md都存到这个文件夹中。
79-
80-
每次在HBuilderX中保存md文件后,onedrive会自动同步这个文件到云端。
81-
82-
使用其他电脑或手持设备后,也会自动看到这个文档。
83-
84-
onedrive手机端不支持直接查看markdown,可另行安装手机App,iOS上推荐使用mweb,安卓上推荐使用锤子便签。
85-
51+
## Useful task list
8652

87-
#### svn、git同步
53+
The task list is very practical, and it is very convenient to manage to-do and already done.
8854

89-
本机装好node后,利用watch监听文件变化,发现文件修改可自动提交到svn或git。
55+
- [ ] Task List-Unfinished Tasks `Shortcut Key: Ctrl+Alt+[`
56+
- [x] Task list-completed tasks `Shortcut key: Ctrl+Alt+]`
9057

91-
团队共享的待办事项同步可以用这种方式处理。
58+
## markdown share to weblink
9259

93-
在DCloud内部,个人文档大多采用方式1,公司协作文档均采用方式2。并行使用。
60+
> HBuilderX 2.8.8, launched MarkDown one-key sharing function. Use uniCloud as a picture bed What is [uniCloud](https://uniapp.dcloud.io/uniCloud/README), reliable, safe, easy to use, and free.
9461
95-
这套方案适用于pc端编写,手机端查看的场景。这个场景下,HBuilderX+markdown拥有远胜于evernote、OneNote等笔记软件的体验。启动更快捷、编写更高效、阅读更美观。
62+
There is also an important problem with using markdown, that is, the storage of pictures. When a markdown file uses a picture, it must be a link. It is too troublesome to edit and upload pictures without using the picture bed.
9663

97-
但如果经常在手机端编写并同步的话,还是云笔记本软件更合适。
64+
Markdown sharing, as the name suggests, is a markdown document written in HBuilderX, you can simply upload it to the cloud through the editor's right-click [share to weblink] menu or shortcut key, and generate a sharing link, and it's completely free!
9865

99-
总看电视和刷短视频,会让人变傻。
66+
Document references to local images will be automatically parsed and uploaded to the cloud.
10067

101-
打开HBuilderX,在键盘上敲出凝结思绪的markdown,会让你变聪明。
68+
[markdown sharing](/Tutorial/extension/markdown_share)

en/Tutorial/UserGuide/LocalFileDiff.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
In the project explorer, select two files to be compared, right-click the menu, and click [Compare selected files]
44

5-
<img src="/static/snapshots/tutorial/file_diff.gif" style="zoom: 90%; border:1px solid #eee;"/>
5+
<img src="/static/snapshots/tutorial/file_diff_en.gif" style="zoom: 80%; border:1px solid #eee;"/>

en/Tutorial/UserGuide/SyntaxCheck.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ The summary result of the verification will be displayed in the `Status Bar`.
3535

3636
For example, if there are two errors, you can press `F4` to switch to different errors. A red wavy line is drawn. When the mouse moves over the red wavy line, a specific error message will be displayed.
3737

38-
<img src="/static/snapshots/started_tutorial/plugins-syntax-check-01.png" style="zoom: 90%;border:1px solid #eee;border-radius: 5px;" />
38+
<img src="/static/snapshots/started_tutorial/plugins-syntax-check-01_en.png" style="zoom: 90%;border:1px solid #eee;border-radius: 5px;" />
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# 内置浏览器
1+
# Built-in Browser
22

3-
HBuilderX,内置浏览器,支持边改边预览
3+
HBuilderX Built-in Browser, Support preview while changing
44

5-
- 支持预览markdown文件
6-
- 支持web项目、vue项目、uniapp项目、5+项目在内置浏览器预览
5+
- Support previewing markdown files
6+
- Support web project, vue project, uniapp project, 5+ project preview in built-in browser
77
- ......
88

9-
### 查找代码中对应的DOM节点、高亮浏览器内对应元素
9+
### Highlight the Elements in the Browser、Find DOM Node in File
1010

11-
> 仅支持HBuilderX 2.6.10+版本
11+
> Only supports HBuilderX 2.6.10+ version
1212
13-
- 在内置浏览器,右键菜单,点击`查找代码中对应的DOM节点`,即可跳转到编辑器相应位置
14-
- 在编辑器内,右键菜单,点击`高亮浏览器内对应元素`, 即可在内置浏览器显示相应元素
13+
- In the built-in browser, Selected element, right-click the menu, click`Highlight the Elements in the Browser`,You can jump to the corresponding position of the editor
14+
- In the editor, Selected code, right-click the menu, click on `Find DOM Node in File` to display the corresponding elements in the built-in browser
1515

16-
**示例**
16+
**Example**
1717

18-
<img src="/static/snapshots/tutorial/browser_1.gif" style="zoom: 90%;border:1px solid #eee;" />
18+
<img src="/static/snapshots/tutorial/browser_1_en.gif" style="zoom: 90%;border:1px solid #eee;" />

0 commit comments

Comments
 (0)