cb8cb01dcf2f3b138f7febe6760e5a18c1c73ff0
✨ Markdown Preview for Neovim ✨
power by ❤️
Introduction
preview markdown on your modern browser with sync scroll and flexible configuration
main features:
- sync scroll
- fast async update
- typesetting math
- plantuml
- emoji
- task list
- local image
- flexible configuration
install & usage
install by vim-plug:
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' }
config:
" set to 1, the nvim will open the preview window once enter the markdown buffer
" default: 0
let g:mkdp_auto_start = 0
" set to 1, the nvim will auto close current preview window when change
" from markdown buffer to another buffer
" default: 1
let g:mkdp_auto_close = 1
" set to 1, the vim will just refresh markdown when save the buffer or
" leave from insert mode, default 0 is auto refresh markdown as you edit or
" move the cursor
" default: 0
let g:mkdp_refresh_slow = 0
" set to 1, the MarkdownPreview command can be use for all files,
" by default it just can be use in markdown file
" default: 0
let g:mkdp_command_for_global = 0
" set to 1, preview server available to others in your network
" by default, the server only listens on localhost (127.0.0.1)
" default: 0
let g:mkdp_open_to_the_world = 0
" options for markdown render
" mkit: markdown-it options for render
" katex: katex options for math
" uml: markdown-it-plantuml options
let g:mkdp_preview_options = {
\ 'mkit': {},
\ 'katex': {},
\ 'uml': {}
\ }
" use a custom markdown style must be absolute path
let g:mkdp_markdown_css = ''
" use a custom highlight style must absolute path
let g:mkdp_highlight_css = ''
" use a custom port to start server or random for empty
let g:mkdp_port = ''
command:
" preview
:MarkdownPreview
" stop preview"
:MarkdownPreviewStop
todo
- use bianry build without node and yarn
reference
- coc.nvim
- highlight
- neovim/node-client
- next.js
- markdown.css
- markdown-it
- markdown-it-katex
- markdown-it-plantuml
- opener
- socket.io
Buy Me A Coffee ☕️
Languages
JavaScript
98.5%
Vim Script
0.8%
CSS
0.3%
TypeScript
0.2%
HTML
0.1%

