mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 20:10:05 +08:00
Doc: add descriptions of installing formatting tools of Markdown. (#2611)
This commit is contained in:
parent
205f236bb7
commit
d5a69a4f94
@ -31,19 +31,31 @@ lang: cn
|
|||||||
|
|
||||||
## 代码格式化
|
## 代码格式化
|
||||||
|
|
||||||
SpaceVim 默认使用 remark 来格式化 Markdown 文件,因此需要安装该命令,可通过如下命令来安装:
|
SpaceVim 默认使用 remark 来格式化 Markdown 文件,Windows 下建议使用 [Prettier](https://github.com/prettier/prettier) 来格式化 Markdown 文件。
|
||||||
|
|
||||||
|
remark 可通过 [npm](https://www.npmjs.com/get-npm) 命令来安装:
|
||||||
```sh
|
```sh
|
||||||
npm -g install remark
|
npm -g install remark
|
||||||
npm -g install remark-cli
|
npm -g install remark-cli
|
||||||
npm -g install remark-stringify
|
npm -g install remark-stringify
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Prettier](https://github.com/prettier/prettier) 可通过 [yarn](https://yarnpkg.com/lang/zh-hans/docs/install/#windows-stable) 或 [npm](https://www.npmjs.com/get-npm) 命令来安装:
|
||||||
|
|
||||||
|
1. 通过 `yarn` 命令来安装
|
||||||
|
```sh
|
||||||
|
yarn global add prettier
|
||||||
|
```
|
||||||
|
2. 通过 `npm` 命令来安装
|
||||||
|
```sh
|
||||||
|
npm install --global prettier
|
||||||
|
```
|
||||||
|
|
||||||
## 模块设置
|
## 模块设置
|
||||||
|
|
||||||
**listItemIndent**
|
**listItemIndent**
|
||||||
|
|
||||||
设置有序列表对齐方式 (`tab`, `mixed` 或者 `1` , 默认: `1`)。
|
设置有序列表对齐方式 (`tab`, `mixed` 或者 `1` , 默认: `1`)。
|
||||||
|
|
||||||
- `'tab'`: 使用 tab stops 对齐
|
- `'tab'`: 使用 tab stops 对齐
|
||||||
- `'1'`: 使用空格对齐
|
- `'1'`: 使用空格对齐
|
||||||
|
@ -9,7 +9,7 @@ description: "Edit markdown within vim, autopreview markdown in the default brow
|
|||||||
|
|
||||||
- [Description](#description)
|
- [Description](#description)
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
- [formatting](#formatting)
|
- [Formatting](#formatting)
|
||||||
- [options](#options)
|
- [options](#options)
|
||||||
- [Key bindings](#key-bindings)
|
- [Key bindings](#key-bindings)
|
||||||
|
|
||||||
@ -28,16 +28,28 @@ To use this configuration layer, update custom configuration file with:
|
|||||||
name = "lang#markdown"
|
name = "lang#markdown"
|
||||||
```
|
```
|
||||||
|
|
||||||
## formatting
|
## Formatting
|
||||||
|
|
||||||
SpaceVim use remark to formatting markdown file, so you need to install this program. You can install it via npm:
|
SpaceVim uses remark to format Markdown file by default, but we suggest using [Prettier](https://github.com/prettier/prettier) on Windows.
|
||||||
|
|
||||||
|
You can install remark via [npm](https://www.npmjs.com/get-npm), the commands are shown as below.
|
||||||
```sh
|
```sh
|
||||||
npm -g install remark
|
npm -g install remark
|
||||||
npm -g install remark-cli
|
npm -g install remark-cli
|
||||||
npm -g install remark-stringify
|
npm -g install remark-stringify
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can install [Prettier](https://github.com/prettier/prettier) via [yarn](https://yarnpkg.com/lang/zh-hans/docs/install/#windows-stable) or [npm](https://www.npmjs.com/get-npm), the commands are shown as below:
|
||||||
|
|
||||||
|
1. Via `yarn`
|
||||||
|
```sh
|
||||||
|
yarn global add prettier
|
||||||
|
```
|
||||||
|
2. Via `npm`
|
||||||
|
```sh
|
||||||
|
npm install --global prettier
|
||||||
|
```
|
||||||
|
|
||||||
### options
|
### options
|
||||||
|
|
||||||
**listItemIndent**
|
**listItemIndent**
|
||||||
|
Loading…
Reference in New Issue
Block a user