Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

vim-markdownfmt

Markdown formatting plugin for Vim. Designed to work with "gofmt-style" commands such as markdownfmt and mdfmt.

Installation

Vundle

If you use Vundle, add the following to your vimrc:

Plugin'moorereason/vim-markdownfmt'

Then install with:

:PluginInstall

Pathogen

If you use Pathogen, do this:

cd~/.vim/bundle
git clone https://github.com/moorereason/vim-markdownfmt.git

Options

Command Executable

Define which "fmt" executable you want to use. It must be in your PATH. Default is markdownfmt.

letg:markdownfmt_command='markdownfmt'

Command Options

Define options to be passed to command executable. Default is empty. Note that -w is always passed as an option.

letg:markdownfmt_options=''

Autosave

Set whether to automatically run format command on save. Default is 0.

letg:markdownfmt_autosave=0

Fail Silently

Set whether to fail silently (1) or show errors (0). Default is 0 (show errors).

letg:markdownfmt_fail_silently=0

Key Bindings

If you decide to leave the autosave feature disabled, you can use a command like the following to format and save the current buffer.

auFileTypemarkdownnmap<leader>s :<C-u>call markdownfmt#Format()<CR>

Credits

License

MIT License. See file LICENSE for more details.

About

Markdown formatting plugin for Vim

Resources

Stars

34 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages