SpaceVim
A modular Vim/Neovim configuration
Home | About | Quick start guide | Documentation | Development | Community | Sponsors | 中文
This layer is for editing markdown file.
To use this configuration layer, update your custom configuration file with:
[[layers]]
name = "lang#markdown"
The tagbar support is provided via lvht/tagbar-markdown which requires php to be installed. You can also use mdctags which is written in rust.
SpaceVim uses remark to format Markdown file by default. You can install remark via npm, the commands are shown below.
npm -g install remark
npm -g install remark-cli
npm -g install remark-stringify
npm -g install remark-frontmatter
npm -g install wcwidth
To use Prettier,
you need to change the layer option: enabled_formatters
.
You can install Prettier via yarn or npm, the commands are shown below:
yarn
yarn global add prettier
npm
npm install --global prettier
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'
: use 1
for tight and tab
for loose list itemsenableWcwidth
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: '-'
).
enabled_formatters
Specify the enabled formater for markdown file, default is ['remark']
. You can also append multiple formatters to this list. e.g. ["remark", "prettier"]
.
To have a table of the headings in the tagbar (toggled by [F2]), make sure php is in your $PATH
(you can test this in SpaceVim : :!php --version
should print something about php).
If you don’t want to install php, you can use mdctags as an alternative.
Key bindings | mode | Descriptions |
---|---|---|
SPC b f |
Normal | Format current buffer |
SPC l c |
Normal/Visual | Create content at cursor |
SPC l C |
Normal/Visual | Remove content |
SPC l k |
Normal/Visual | Add URL link for word under cursor or slected word |
SPC l K |
Normal/Visual | Add picture link for word under cursor or slected word |
SPC l r |
Normal/Visual | Run code in block |
SPC l u |
Normal/Visual | Update content |
SPC l p |
Normal | Real-time markdown preview |
SPC l t |
Normal | toggle todo status |
Powered by Jekyll