# Vim Markdown
[![Vint](https://github.com/preservim/vim-markdown/workflows/Vint/badge.svg)](https://github.com/preservim/vim-markdown/actions?workflow=Vint)
[![Vader](https://github.com/preservim/vim-markdown/workflows/Vader/badge.svg)](https://github.com/preservim/vim-markdown/actions?workflow=Vader)
Syntax highlighting, matching rules and mappings for [the original Markdown](http://daringfireball.net/projects/markdown/) and extensions.
1. [Installation](#installation)
1. [Basic usage](#basic-usage)
1. [Options](#options)
1. [Mappings](#mappings)
1. [Commands](#commands)
1. [Credits](#credits)
1. [License](#license)
## Installation
If you use [Vundle](https://github.com/gmarik/vundle), add the following lines to your `~/.vimrc`:
```vim
Plugin 'godlygeek/tabular'
Plugin 'preservim/vim-markdown'
```
The `tabular` plugin must come *before* `vim-markdown`.
Then run inside Vim:
```vim
:so ~/.vimrc
:PluginInstall
```
If you use [Pathogen](https://github.com/tpope/vim-pathogen), do this:
```sh
cd ~/.vim/bundle
git clone https://github.com/preservim/vim-markdown.git
```
To install without Pathogen using the Debian [vim-addon-manager](http://packages.qa.debian.org/v/vim-addon-manager.html), do this:
```sh
git clone https://github.com/preservim/vim-markdown.git
cd vim-markdown
sudo make install
vim-addon-manager install markdown
```
If you are not using any package manager, download the [tarball](https://github.com/preservim/vim-markdown/archive/master.tar.gz) and do this:
```sh
cd ~/.vim
tar --strip=1 -zxf vim-markdown-master.tar.gz
```
## Basic usage
### Folding
Folding is enabled for headers by default.
The following commands are useful to open and close folds:
- `zr`: reduces fold level throughout the buffer
- `zR`: opens all folds
- `zm`: increases fold level throughout the buffer
- `zM`: folds everything all the way
- `za`: open a fold your cursor is on
- `zA`: open a fold your cursor is on recursively
- `zc`: close a fold your cursor is on
- `zC`: close a fold your cursor is on recursively
[Options](#options) are available to disable folding or change folding style.
Try `:help fold-expr` and `:help fold-commands` for details.
### Concealing
Concealing is set for some syntax such as bold, italic, code block and link.
Concealing lets you conceal text with other text. The actual source text is not modified. If you put your cursor on the concealed line, the conceal goes away.
[Options](#options) are available to disable or change concealing.
Try `:help concealcursor` and `:help conceallevel` for details.
## Options
### Disable Folding
- `g:vim_markdown_folding_disabled`
Add the following line to your `.vimrc` to disable the folding configuration:
let g:vim_markdown_folding_disabled = 1
This option only controls Vim Markdown specific folding configuration.
To enable/disable folding use Vim's standard folding configuration.
set [no]foldenable
### Change fold style
- `g:vim_markdown_folding_style_pythonic`
To fold in a style like [python-mode](https://github.com/klen/python-mode), add the following to your `.vimrc`:
let g:vim_markdown_folding_style_pythonic = 1
`g:vim_markdown_folding_level` setting (default 1) is set to `foldlevel`.
Thus level 1 heading which is served as a document title is expanded by default.
- `g:vim_markdown_override_foldtext`
To prevent foldtext from being set add the following to your `.vimrc`:
let g:vim_markdown_override_foldtext = 0
### Set header folding level
- `g:vim_markdown_folding_level`
Folding level is a number between 1 and 6. By default, if not specified, it is set to 1.
let g:vim_markdown_folding_level = 6
Tip: it can be changed on the fly with:
:let g:vim_markdown_folding_level = 1
:edit
### Disable Default Key Mappings
- `g:vim_markdown_no_default_key_mappings`
Add the following line to your `.vimrc` to disable default key mappings:
let g:vim_markdown_no_default_key_mappings = 1
You can also map them by yourself with `<Plug>` mappings.
### Enable TOC window auto-fit
- `g:vim_markdown_toc_autofit`
Allow for the TOC window to auto-fit when it's possible for it to shrink.
It never increases its default size (half screen), it only shrinks.
let g:vim_markdown_toc_autofit = 1
### Text emphasis restriction to single-lines
- `g:vim_markdown_emphasis_multiline`
By default text emphasis works across multiple lines until a closing token is found. However, it's possible to restrict text emphasis to a single line (i.e., for it to be applied a closing token must be found on the same line). To do so:
let g:vim_markdown_emphasis_multiline = 0
### Syntax Concealing
- `g:vim_markdown_conceal`
Concealing is set for some syntax.
For example, conceal `[link text](link url)` as just `link text`.
Also, `_italic_` and `*italic*` will conceal to just _italic_.
Similarly `__bold__`, `**bold**`, `___italic bold___`, and `***italic bold***`
will conceal to just __bold__, **bold**, ___italic bold___, and ***italic bold*** respectively.
To enable conceal use Vim's standard conceal configuration.
set conceallevel=2
To disable conceal regardless of `conceallevel` setting, add the following to your `.vimrc`:
let g:vim_markdown_conceal = 0
To disable math conceal with LaTeX math syntax enabled, add the following to your `.vimrc`:
let g:tex_conceal = ""
let g:vim_markdown_math = 1
- `g:vim_markdown_conceal_code_blocks`
Disabling conceal for code fences requires an additional setting:
let g:vim_markdown_conceal_code_blocks = 0
### Fenced code block languages
- `g:vim_markdown_fenced_languages`
You can use filetype name as fenced code block languages for syntax highlighting.
If you want to use different name from filetype, you can add it in your `.vimrc` like so:
let g:vim_markdown_fenced_languages = ['csharp=cs']
This will cause the following to be highlighted using the `cs` filetype syntax.
```csharp
...
```
Default is `['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']`.
### Follow named anchors
- `g:vim_markdown_follow_anchor`
This feature allows the `ge` command to follow named anchors in links of the form
`file#anchor` or just `#anchor`, where file may omit the `.md` extension as
usual. Two variables control its operation:
let g:vim_markdown_follow_anchor = 1
This tells vim-markdown whether to attempt to follow a named anchor in a link or
not. When it is 1, and only if a link can be split in two parts by the pattern
'#', then the first part is interpreted as the file and the second one as the
named anchor. This also includes urls of the form `#anchor`, for which the first
part is considered empty, meaning that the target file is the current one. After
the file is opened, the anchor will be searched.
Default is `0`.
- `g:vim_markdown_anchorexpr`
let g:vim_markdown_anchorexpr = "'<<'.v:anchor.'>>'"
This expression will be evaluated substituting `v:anchor` with a quoted string
that contains the anchor to visit. The result of the evaluation will become the
real anchor to search in the target file. This is useful in order to convert
anchors of the form, say, `my-section-title` to searches of the form `My Section
Title` or `<<my-section-title>>`.
Default is `''`.
### Syntax extensions
The following options control which syntax extensions will be turned on. They are off by default.
#### LaTeX math
- `g:vim_markdown_math`
Used as `$x^2$`, `$$x^2$$`, escapable as `\$x\$` and `\$\$x\$\$`.
let g:vim_markdown_math = 1
#### YAML Front Matter
- `g:vim_markdown_frontmatter`
Highlight YAML front matter as used by Jekyll or [Hugo](https://gohugo.io/content/front-matter/).
let g:vim_
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
vim插件管理是一件繁琐的事情,涉及到插件管理器(如VundleVim/Vundle.vim)的安装和.vimrc文件的配置,特别是插件很多来自github,下载慢,繁琐,虽然网上资料 一堆堆,但有了我这个资源,你就一键轻松搞定。 该资源收录了我个人(也是其他开发者)最经常使用的vim插件: nerdtree,vim-markdown,vim-tex,supertab 以及自定义的快捷键。 即使你是新手,也能根据这个资源中的说明,1分钟内搞定。 注意:我这里针对的是linux系统,对于windows系统需要稍作修改,那个你自己摸索 我已经不使用windows系统好久了。 注意:使用说明中提到linux系统主目录,就是home目录(家目录)
资源推荐
资源详情
资源评论
收起资源包目录
linux系统下(如uos,deepin,麒麟等)vim最常用插件一键式配置及安装 (1674个子文件)
07e46c26849f99132cd68571ba373a0a3fe3ca 57B
093c81b17b8fc8cfe6659348745b3b83991121 244B
0a660f2e79af01ce01a608cc2bbfce812657f4 83B
110c12c3a1f45752f40a9b0c767e204dc08070 456B
11695d0697a71cb373e2f75c98718bfa13ee0f 849B
15cb2218931c8aba96c2f09cbfa8c69397597a 83B
16c34cbbebc4975f43ef8591c57db336a64e9e 133B
21bfe413c55b3a01ee6335e0ec38eb420384cf 84B
266e87eeecd46921fdfbfd76d8bfdda3d9873b 223B
2b2d5f09d8f43c065f94d5ea32e6e389ba23b7 2KB
2d525b71c3a8d95692db121de899a1d066be2c 130B
31d4287fd2e632fc15d591cc564025192468ae 129B
351a79dd3189310d84e61d90c32b755d6b592c 3KB
39fd04a9b8ba1359d9e3bcfa63c6f2c8069f65 84B
3a969feddb60c2ae3e189bc47adb6c8c4ecaaa 84B
45415ba8d870b766b81983817bab957f287cf6 3KB
4c1e13c0f4579c57e4f6d8a170b8a5cccc9241 84B
4eb90614520d60291c954807e5f3b31dfcdcc5 83B
5415b19b7b1bbb3828787d1bf5abfee310fe1e 182B
57a01fa601116deced77134a29f3289b11c11f 237B
64b9e4454834301ec09cfc901b068897c0dda0 57B
64c6b52ce1998c33219f67debbb2edddb38a34 296B
66970a625af7791708aae3c3b3ae9dc34aa321 1KB
671b8cadef2d899fd9cefa686bbce217647f4c 259B
6cfe7253998e27d40b8db312c523e3404befa2 131B
7cf00c5eccc4e9f7e9a61d145f95ed11747b7c 182B
8faf3fcccf717e718b3b210f9b86ffb3deb7d7 1KB
94cedeba93ff0c79594fba2d9e703556a6b8c7 57B
9759504f8e0261302d8086ca9134f05fc79d65 131B
a8ebc98b9392b35b8d4f539af2a947a703b47b 287B
abntcite 106B
accents 438B
acro 235B
acromake 205B
acronym 215B
afterpage 192B
afterpage 10B
algorithm2e 2KB
allrunes 273B
alltt 255B
amsbsy 11B
amsfonts 258B
amsmath 2KB
amsmath 1KB
amsopn 88B
amssymb 3KB
amsthm 404B
amsthm 73B
amsxtra 200B
appendix 356B
arabic 184B
array 325B
array 91B
attachfile 72B
sub1.aux 2KB
main.aux 1KB
test1.aux 691B
input2.aux 33B
input1.aux 33B
b248278ef361631107ff1bc9b31ae9b9b325a0 130B
b32935bf6d0a16ebe909a80d2d91962e744e80 57B
b6418380a235a7af49a45f70b196c4f75d952c 1KB
babel 2KB
babel 972B
bar 697B
test_parser_bcf.bcf 99KB
beamerfoils 91B
beamerprosper 378B
beamerseminar 75B
beamertexpower 154B
beamerthemeFhG 389B
bed5d420259da16b73239f8228b144e4d62e64 84B
huge.bib 513KB
test.bib 3KB
test-cites.bib 1KB
glossaries-extra.bib 968B
test.bib 753B
test_matchstr.bib 437B
test_globbed.bib 408B
test_globbed_1.bib 388B
test_globbed_2.bib 362B
test_jobname.bib 170B
references.bib 143B
test_custom_bibs.bib 80B
local1.bib 80B
local2.bib 80B
main.bib 70B
book.bib 26B
local.bib 0B
local.bib 0B
references.bib 0B
references.bib 0B
references.bib 0B
biblatex 6KB
biblatex 3KB
test_parser_blg.blg 2KB
bm 157B
bm 76B
booktabs 75B
bophook 209B
共 1674 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
中年阿甘
- 粉丝: 456
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Qt开发知识、经验总结 包括Qss,数据库,Excel,Model/View等
- IV数据.xlsx
- foldcraftlauncher_262944.apk
- 珍藏多年的基于matlab实现潮流计算程序源代码集合,包含多个潮流计算程序.rar
- 使用FPGA实现串-并型乘法器
- 基于matlab实现针对基于双曲线定位的DV-Hop算法中误差误差出一种基于加权双曲线定位的DV-Hop改进算法.rar
- 基于matlab实现由遗传算法开发的整数规划,车辆调度问题.rar
- 电视家7.0(对电视配置要求高).apk
- 免费计算机毕业设计-基于JavaEE的医院病历管理系统设计与实现(包含论文+源码)
- 手机端 我的世界融合植物大战僵尸版.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功