mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 19:00:04 +08:00
5f1d96b7cf
* Fixed: the | that prefixed by a \ should not be treated as a seperator of MarkDown table. * Remove the key binding SPC l ft of Markdown layer. * Doc: remove the descriptions of SPC l ft which has been removed.
2.0 KiB
2.0 KiB
title | description |
---|---|
SpaceVim lang#markdown layer | Edit markdown within vim, autopreview markdown in the default browser, with this layer you can also format markdown file. |
Available Layers >> lang#markdown
Description
This layer is for editing markdown file.
Install
To use this configuration layer, update custom configuration file with:
[[layers]]
name = "lang#markdown"
Formatting
SpaceVim uses remark to format Markdown file by default, but we suggest using Prettier on Windows.
You can install remark via npm, the commands are shown as below.
npm -g install remark
npm -g install remark-cli
npm -g install remark-stringify
You can install Prettier via yarn or npm, the commands are shown as below:
- Via
yarn
yarn global add prettier
- Via
npm
npm install --global prettier
options
listItemIndent
How to indent the content from list items (tab
, mixed
or 1 , default: 1).
'tab'
: use tab stops (4 spaces)'1'
: use one space'mixed'
: use1
for tight andtab
for loose list items
enableWcwidth
Enable/Disable wcwidth for detecting the length of a table cell, default is 0. To enable this option, you need to install wcwidth
listItemChar
Bullet marker to use for list items ('-'
, '*'
, or '+'
, default: '-'
).
Key bindings
Key bindings | mode | Descriptions |
---|---|---|
SPC b f |
Normal | Format current buffer |
SPC l k |
Normal | Add URL |
SPC l p |
Normal | Real-time markdown preview |