{"id":13601903,"url":"https://github.com/shushcat/vim-minimd","last_synced_at":"2025-04-11T04:31:55.971Z","repository":{"id":147057042,"uuid":"14273722","full_name":"shushcat/vim-minimd","owner":"shushcat","description":"A fast, folding Markdown outliner for Vim","archived":false,"fork":false,"pushed_at":"2024-08-01T21:04:01.000Z","size":94,"stargazers_count":32,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-02T18:41:38.804Z","etag":null,"topics":["bibliography","fold","markdown","org-mode","outliner","pandoc","vim","vim-script","writing-tool"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shushcat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-11-10T09:14:13.000Z","updated_at":"2024-08-01T21:04:05.000Z","dependencies_parsed_at":"2023-11-22T23:28:41.784Z","dependency_job_id":"969dc4d7-7d1b-43ba-9feb-129fd954407c","html_url":"https://github.com/shushcat/vim-minimd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shushcat%2Fvim-minimd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shushcat%2Fvim-minimd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shushcat%2Fvim-minimd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shushcat%2Fvim-minimd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shushcat","download_url":"https://codeload.github.com/shushcat/vim-minimd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458708,"owners_count":17148505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bibliography","fold","markdown","org-mode","outliner","pandoc","vim","vim-script","writing-tool"],"created_at":"2024-08-01T18:01:09.794Z","updated_at":"2025-04-11T04:31:55.954Z","avatar_url":"https://github.com/shushcat.png","language":"Vim Script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# minimd\n\nMinimd is a Vim plugin that helps with writing long [Markdown](https://commonmark.org/) documents by folding sections and showing outlines of their contents.\n\nThe basic idea is that pressing spacebar on an _unfolded_ level 1 header will fold that header, while pressing spacebar on a _folded_ level 1 header will both unfold it and fold all the level 2 headers it contains.  If you fold then unfold a level 3 header, any level 4 headers are folded, and so on.  Pressing a number followed by the spacebar folds all headers of that number, which is an outline.\n\nMinimd also has a few other features to make working with long documents easier:\n\n- Header motion command that ignore code blocks (so don't mistake `#` comments for headers);\n- Minimal syntax highlighting (headers, code blocks, square brackets, checkboxes, and the task markers `ACTV`, `TODO`, `WAIT`, `CNCL`, and `DONE`) so as not to be too distracting and to speed up the folding a bit\n- Shortcuts to simultaneously change the levels of all headers within a fold\n\n## Demonstration\n\n![](http://johnob.sdf.org/resources/minimd_demo.gif)\n\n## Usage\n\n| Normal mode key              | Action                                      | \n| ---------------              | ------                                      | \n| `Space`                      | Fold or unfold the current header.          | \n| _n_`Space`                   | Fold all headers of level _n_.              | \n| `Tab` or `]h`                | Jump to next header.                        | \n| _n_`Tab` or _n_`]h`          | Jump to next header of level _n_.           | \n| `Shift-Tab` or `[h`          | Jump to previous header.                    | \n| _n_`Shift-Tab` or _n_`[h`    | Jump to previous header of level _n_.       | \n| `=`                          | Promote header (`#` → `##`).                | \n| `-`                          | Demote header (`##` → `#`).                 | \n| `Enter`                      | Add and toggle checkboxes in lists          | \n|                              | (`-` → `- [ ]` → `- [x]` → `- [ ]`),        | \n|                              | or cycle between headline states            | \n|                              | (`#` → `# TODO` → `# DONE` → `#`).          | \n| `Escape Enter`               | Cycle between additional headline states    | \n|                              | (`#` → `# TODO` → `# ACTV` → `# WAIT`       | \n|                              | `# CNCL` → `# DONE` → `#`).                 | \n\nThe header promotion and demotion commands act on all enclosed headers when invoked on a fold.\n\nAs always in Vim, you can execute any command from Insert mode by prefixing it with `Ctrl-o`; so, for example, you would toggle a checkbox without leaving Insert mode by typing `Ctrl-o` followed by `Enter`.  For more on executing Normal mode commands from Insert mode, consult `:help i_CTRL-o`.\n\n### Customization\n\nThis plugin can be used with [Vim's default Markdown syntax](https://github.com/tpope/vim-markdown) by adding the line `let g:default_markdown_syntax = 1` to your `vimrc`.\n\nThe default mappings for this plugin's folding, motion, header promotion and demotion, and task toggling commands are as follows.\n\n    nmap \u003csilent\u003e\u003cbuffer\u003e \u003cSpace\u003e :\u003cC-u\u003eMiniMDToggleFold\u003cCR\u003e\n    nmap \u003csilent\u003e\u003cbuffer\u003e \u003cTab\u003e :\u003cC-u\u003eMiniMDNext\u003cCR\u003e\n    nmap \u003csilent\u003e\u003cbuffer\u003e \u003cS-Tab\u003e :\u003cC-u\u003eMiniMDPrev\u003cCR\u003e\n    nmap \u003csilent\u003e\u003cbuffer\u003e ]h :\u003cC-u\u003eMiniMDNext\u003cCR\u003e\n    nmap \u003csilent\u003e\u003cbuffer\u003e [h :\u003cC-u\u003eMiniMDPrev\u003cCR\u003e\n    nnoremap \u003csilent\u003e\u003cbuffer\u003e = :MiniMDPromote\u003cCR\u003e\n    nnoremap \u003csilent\u003e\u003cbuffer\u003e - :MiniMDDemote\u003cCR\u003e\n    nmap \u003csilent\u003e\u003cbuffer\u003e \u003cCR\u003e :MiniMDTaskToggle\u003cCR\u003e\n    vmap \u003csilent\u003e\u003cbuffer\u003e \u003cCR\u003e :MiniMDTaskToggle\u003cCR\u003e\n\nNote that, according to `:help v:count`, the mappings for `MiniMDToggleFold`, `MiniMDNext`, and `MiniMDPrev` must be prefixed with `\u003cC-u\u003e` in order for the functions wrapped by those commands to accept numeric arguments.  So if, e.g., you wanted to map the folding command to `z`, you would add a line like the following to your `.vimrc`:\n\n    nmap z :\u003cC-u\u003eMiniMDToggleFold\u003cCR\u003e\n\n## Exporting Files\n\nExports to other file types are best done with [Pandoc](https://pandoc.org) since Minimd strictly adheres to a subset of the overlap between [Pandoc's Markdown syntax](https://pandoc.org/MANUAL.html#pandocs-markdown) and [the Commonmark specification](https://spec.commonmark.org/).\n\nYou can easily set keybindings to facilitate repeated exports.  For instance, the sequence `\u003cLeader\u003eep` could be set to export a PDF of the current Markdown file by adding the line `autocmd FileType minimd nmap \u003cLeader\u003eep :!pandoc -f markdown -o example.pdf '%'` to your `vimrc`.  See [the Pandoc manual](https://pandoc.org/MANUAL.html) for an overview of its many options.\n\n## Related Projects\n\nMinimd started out as an implementation of the header visibility cycling idea from [Org Mode](https://orgmode.org/) (and of [Outline Mode](https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html) before that) for Emacs.  If you use Emacs, you should probably use one of those, and it should probably be Org Mode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshushcat%2Fvim-minimd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshushcat%2Fvim-minimd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshushcat%2Fvim-minimd/lists"}