Vim Plug for Markdown View

Published on: January 13, 2022 | Reading Time: 1 min | Last Modified : January 13, 2022

编辑器
markdown

VIM的这个插件解决了平时阅读md文件的麻烦

首先,(明天还要核酸检测!)vim-plug安装,一句命令

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

然后配置用户.vimrc文件

call plug#begin()
Plug 'iamcco/mathjax-support-for-mkdp'
Plug 'iamcco/markdown-preview.vim'

call plug#end()

# 运行了PlugInstall命令后再加入下面4行快捷键,F8预览,F9返回

nmap <silent> <F8> <Plug>MarkdownPreview        " for normal mode
imap <silent> <F8> <Plug>MarkdownPreview        " for insert mode
nmap <silent> <F9> <Plug>StopMarkdownPreview    " for normal mode
imap <silent> <F9> <Plug>StopMarkdownPreview    " for insert mode

至此就结束了,配图

screen