markdown_autoformat.vim : Automatic formatting heuristics for Markdown
| script karma |
Rating 5/4,
Downloaded by 803 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Tom Ryder |
| |
| script type |
| ftplugin |
| |
| description |
This filetype plugin for Markdown documents ("markdown" filetype) attempts to apply the 'formatoptions' flag a for auto-format intelligently in three ways:
Turn it on automatically on load if the buffer looks wrapped
Suspend it if editing a line in a code block (indented by four spaces)
Suspend it if pasting something with a linebreak in it
It defaults to doing all three, but that can be disabled with options.
The proper way to do this is with a formatexpr for Markdown, but a good one doesn't seem to exist yet. This plugin might eventually take the form of writing one.
https://sanctum.geek.nz/cgit/vim-markdown-autoformat.git |
| |
| install details |
| This should probably be saved as ~/.vim/after/ftplugin/markdown/autoformat.vim (per the distribution layout) or ~/.vim/after/ftplugin/markdown_autoformat.vim (if you prefer), so that it definitely loads *after* the primary markdown.vim plugin. Put the autoload script in ~/.vim/autoload/markdown/autoformat.vim. Or, just use your favourite Vim plugin manager. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|