sponsor Vim development Vim logo Vim Book Ad

mkdx.vim : Adds useful mappings for working with markdown files

 script karma  Rating 8/5, Downloaded by 443  Comments, bugs, improvements  Vim wiki

created by
Sidney Liebrand
script type
This is a mirror of https://github.com/SidOfc/mkdx. The version there will always be up-to-date.

mkdx.vim is a markdown plugin that aims to reduce the time you spend formatting your markdown documents. It does this by adding some configurable mappings for files with a markdown filetype. Functions are included to handle lists, checkboxes (even lists of checkboxes!), fenced code blocks, shortcuts, headers and links. In addition to that, this plugin provides a mapping to convert a selection of CSV data to a markdown table. and well, lots more even! Visit :h mkdx or :h mkdx-helptags for more information.
install details
Plugin installation is possible using a package manager like Vundle (https://github.com/VundleVim/Vundle.vim) or Pathogen (https://github.com/tpope/vim-pathogen).
If you're downloading the ZIP, I'm just going to assume you know what you're doing and that it is exactly what you want to do, 21st century installation is always an option to fall back to :)
IMPORTANT: Github is updated more frequently, therefore I highly recommend using a package manager instead of doing a manual install, you could be missing some patches otherwise.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
mkdx-1.6.1.zip 1.6.1 2018-05-14 7.0 Sidney Liebrand Add: Highlighting for tables, <kbd> shortcuts and _**bolditalic**_.
Add: shift+enter support to create multiline items (#44).
Fix: shift+enter no longer require double escape to exit insert mode.
Fix: Dead link detection, incorrect external label and relative links were always skipped.
Fix: grep and ggrep do not count line column properly (byte-offset is converted now).
mkdx-1.6.0.zip 1.6.0 2018-05-11 7.0 Sidney Liebrand
Fix: Handle URLS starting with "../../" correctly.
- Fix: Removed hardcoded hashtag as header identifier in function.
- Fix: (#35) Generating a TOC in the details didn't generate the final closing tags.
- Fix: (#40) Shift-o (O) prepending a list item to a line starting with a number.
- Fix: (#39) Set autoindent, it is enabled by default in Neovim but disabled by default in Vim.
- Add: (#41) Fold support for the table of contents and fenced code blocks (opt-in).
- Add setting to enable folding: g:mkdx#settings.fold.enable = 0.
- Add setting to modify what is folded: g:mkdx#settings.fold.components = ['toc', 'fence'].
    - Add: (#32) dictionarywatcher that watches settings and immediately updates the document.
    - Add: setting to control auto-updates: g:mkdx#settings.auto_update.enable = 1.
mkdx-1.5.1.zip 1.5.1 2018-05-05 7.0 Sidney Liebrand - dead link detection (https://github.com/sidofc/mkdx#dead-link-detection) uses a grep program and job when available
- jumping to headers (https://github.com/sidofc/mkdx#jump-to-header) uses a grep program and job when available
- insert autocompletion (https://github.com/sidofc/mkdx#insert-mode-fragment-completion) uses a grep program and job when available
mkdx-1.5.0.zip 1.5.0 2018-04-28 7.0 Sidney Liebrand Add insert mode completion for fragment links (https://github.com/SidOfc/mkdx#insert-mode-fragment-completion).
- Add setting (https://github.com/SidOfc/mkdx#gmkdxsettingslinksfragmentcomplete) to control completions.
- Add support for anchor fragment links (#24 (https://github.com/SidOfc/mkdx/issues/24)) (<a id="hello"></a> / <a name="hello"></a>) for jumping (https://github.com/SidOfc/mkdx#jump-to-header), detection (https://github.com/SidOfc/mkdx#dead-link-detection) and completion (https://github.com/SidOfc/mkdx#insert-mode-fragment-completion).
- Fix issue where double slashes in the URL would not be removed in external link checks.
- Fix nested <a></a> tags in generated TOC links.
mkdx-1.4.3.zip 1.4.3 2018-04-27 7.0 Sidney Liebrand (#17 - https://github.com/SidOfc/mkdx/issues/17) Add a mapping to go to fragment link location. (https://github.com/sidofc/mkdx#jump-to-header)
(#18 - https://github.com/SidOfc/mkdx/issues/18) Add alignment options for columns in a table generated from CSV. (https://github.com/sidofc/mkdx#gmkdxsettingstablealign)
(#18 - https://github.com/SidOfc/mkdx/issues/18) Add alignment options for specific column names or indexes in a table generated from CSV. (https://github.com/sidofc/mkdx#gmkdxsettingstablealign)
List items require a space after them to be recognized as a list item.
mkdx-1.4.2.zip 1.4.2 2018-04-15 7.0 Sidney Liebrand - Convert CSV to table (https://github.com/SidOfc/mkdx#convert-csv-to-table) now also supports quoted CSV and TSV data
mkdx-1.4.1.zip 1.4.1 2018-04-08 7.0 Sidney Liebrand - Dead link detection will now also scan any `href=""` attribute content.
mkdx-1.4.0.zip 1.4.0 2018-04-08 7.0 Sidney Liebrand - Update Dead link detection (https://github.com/SidOfc/mkdx#dead-link-detection) to include support for external and relative links.
- Add new settings (https://github.com/SidOfc/mkdx#gmkdxsettingslinksexternalenable) to control request timeout and relative link host etc.
mkdx-1.3.0.zip 1.3.0 2018-04-02 7.0 Sidney Liebrand - Added feature: Dead fragment link detection
- Automatically remove "r" from "formatoptions" inside markdown files (buffer local override)
- Fix table of contents eating a header when there is no blank line between the table of contents and the next heading
- Cursor stays on the same line after updating table of contents
- mkdx#QuickfixHeaders() shows amount of headers and doesn't open quickfix when no headers are present.
mkdx-1.2.0.zip 1.2.0 2018-04-01 7.0 Sidney Liebrand Added feature: Support generating table of contents inside <details> tag. (https://github.com/sidofc/mkdx#generate-or-update-toc-as-details)
mkdx-1.1.0.zip 1.1.0 2018-03-31 7.0 Sidney Liebrand - Stricter rules for highlighting (do not highlight bold markers at start of line as list items).
- Fix TOC links using headings containing <kbd /> tags.
- Fix deep merging of `g:mkdx#settings` hash.
- Add setting to place TOC in fixed position.
mkdx-1.0.2.zip 1.0.2 2018-03-25 7.0 Sidney Liebrand - Fix incorrect mapping detection
- Update README, add remapping section
mkdx-1.0.1.zip 1.0.1 2018-03-24 7.0 Sidney Liebrand - All mappings now use <Plug>(mkdx-*) structure
mkdx-1.0.0.zip 1.0.0 2018-03-24 7.0 Sidney Liebrand - Fix #11 - `mkdx#ToggleQuote` inserting `0` on empty lines
- Fix #12 - Update (task-)lists inside a quote
- Fix #13 - Add / remove (task-)lists inside a quote
- Add `<Plug>(mkdx-o)` in favor of directly mapping to `A<Cr>` to trigger `mkdx#EnterHandler`
- Add `<Plug>(mkdx-shift-o)` in favor of directly mapping to `:call mkdx#ShiftOHandler()<Cr>`
mkdx-0.9.0.zip 0.9.0 2018-01-28 7.0 Sidney Liebrand - Fix `mkdx#HeaderToQF` wrong function ref.
- Fix `g:mkdx#settings.enter.enable` and `g:mkdx#settings.enter.shifto` can be disabled during runtime.
- Fix insert mode "\~\~\~" and "\`\`\`" recursion.
- Add support for [toggling \<kbd /> shortcuts](#toggling-kbd--shortcuts) in normal and visual mode.
mkdx-0.8.0.zip 0.8.0 2018-01-21 7.0 Sidney Liebrand - Fix some issues with `mkdx#WrapLink`.
- `mkdx#WrapLink` handles selections that include newline character correctly.
- Headers can now also be toggled on / off using `mkdx#ToggleHeader`.
- When deleting a list item anywhere in the list, following list items are decremented by 1.
- Added more tests for
    - decrementing list items
    - promoting / demoting headers
    - Wrapping links and images
mkdx-0.7.1.zip 0.7.1 2018-01-13 7.0 Sidney Liebrand Adds shift-o support alongside regular o and enter in insert mode. when pressing shift-o in the middle of a list, an item will be inserted above the current line and the cursor will be moved there.
mkdx-0.7.0.zip 0.7.0 2018-01-13 7.0 Sidney Liebrand Adds menu support if it is available to the installed vim. menu will be displayed in the top bar in gvim/macvim and can be accessed through :menu Plugin.mkdx from terminal vims that support it.
mkdx-0.6.1.zip 0.6.1 2018-01-10 7.0 Sidney Liebrand Fixes space prepended when wrapping the only word on a line in a link
mkdx-0.6.0.zip 0.6.0 2018-01-07 7.0 Sidney Liebrand Adds opt-in highlighting for different checkbox states. See GH README for gifs. or :h mkdx-highlighting within Vim for more information.
mkdx-0.5.0.zip 0.5.0 2018-01-06 7.0 Sidney Liebrand Added feature to open the quickfix list containing all markdown headers in the current file.
mkdx- 2018-01-05 7.0 Sidney Liebrand HOTFIX: EnterHandler not inserting enters in some cases (prepends a "0" to the current line instead)
mkdx-0.4.3.zip 0.4.3 2018-01-01 7.0 Sidney Liebrand Complete rewrite of mkdx#EnterHandler.
Task lists are updated when an item is removed (pressing enter twice at the end of an existing list item).
Better updating / inserting of regular lines of checkboxes.
Happy new year too, everyone :)
mkdx-0.4.2.zip 0.4.2 2017-12-31 7.0 Sidney Liebrand Fixes issue where enter would be offset by 1 character horizontally.
In addition to completing list items, quotes and checklist items, pressing enter after a checkbox task will now add a checkbox on the new line as well :)
Major settings refactor that maintains backward compatibility. See :h mkdx-var-settings for more information.
mkdx-0.4.1.zip 0.4.1 2017-12-30 7.0 Sidney Liebrand Adds better support for toggling from and to specific types of lines such as checkboxes, checklists and lists.
RENAMED: mkdx#ToggleCheckbox to mkdx#ToggleCheckboxState.
mkdx-0.4.0.zip 0.4.0 2017-12-24 7.0 Sidney Liebrand This version adds support for toggling between regular lines and list/checkbox/checklist lines.
It also fixes an issue where pressing ENTER at the start of a line would actually execute ENTER after the first character (thus leaving a character "hanging").
When updating the table of contents, the cursor position is correctly restored to its original position.
mkdx-0.3.0.zip 0.3.0 2017-12-18 7.0 Sidney Liebrand Add support for wrapping text in bold, italic, strikethrough and inline-code in normal and visual mode.
Fixes a bug where wrapping link at end of line would not respect spacing.
mkdx-0.2.0.zip 0.2.0 2017-12-08 7.0 Sidney Liebrand Add support for wrapping images in image links and pressing <Enter> in a tasklist now updates the tasklist after adding a new empty task.
mkdx-0.1.8.zip 0.1.8 2017-12-06 7.0 Sidney Liebrand This version provides better support for malformed indentation when updating checkboxes in nested lists.
mkdx-0.1.7.zip 0.1.7 2017-12-03 7.0 Sidney Liebrand This version adds support for updating parent and child checklist items in markdown lists.
mkdx-0.0.7.zip 0.0.7 2017-11-25 7.0 Sidney Liebrand This version adds support for checkboxes in list items. When a checkbox is detected on the line where <enter> was pressed, an empty checkbox will be inserted in the new empty line.
mkdx-0.0.6.zip 0.0.6 2017-11-25 7.0 Sidney Liebrand Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo