markdown_autoformat.vim : Automatic formatting heuristics for Markdown
| script karma
Downloaded by 524
Comments, bugs, improvements
script versions (upload new version)
|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.
|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.|
Click on the package to download.
ip used for rating: 22.214.171.124