All Projects → shushcat → vim-minimd

shushcat / vim-minimd

Licence: ISC License
A fast, folding Markdown outliner for Vim

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to vim-minimd

Awesome Scientific Writing
⌨️ A curated list of awesome tools, demos and resources to go beyond LaTeX
Stars: ✭ 162 (+500%)
Mutual labels:  pandoc, org-mode
pandoc alfred
Pandoc-Suite for Academic Writing in Markdown
Stars: ✭ 68 (+151.85%)
Mutual labels:  bibliography, pandoc
doconce
Lightweight markup language - Document Once
Stars: ✭ 43 (+59.26%)
Mutual labels:  pandoc, writing-tool
Orgzly Android
Outliner for taking notes and managing to-do lists
Stars: ✭ 2,042 (+7462.96%)
Mutual labels:  org-mode, outliner
Org Roam Bibtex
Connector between Org-roam, BibTeX-completion, and Org-ref
Stars: ✭ 253 (+837.04%)
Mutual labels:  bibliography, org-mode
bookends-tools
Alfred Workflow to Integrate with Bookends, an academic reference manager/bibliography tool for macOS
Stars: ✭ 78 (+188.89%)
Mutual labels:  bibliography, pandoc
organic
Outliner, organizer and notes management app.
Stars: ✭ 37 (+37.04%)
Mutual labels:  org-mode, outliner
zettel-mode
A Zettelkasten-style note-taking helper
Stars: ✭ 32 (+18.52%)
Mutual labels:  org-mode
emanote
Spiritual successor to neuron, based on Ema.
Stars: ✭ 301 (+1014.81%)
Mutual labels:  pandoc
markdown-css
Stylesheets for Markdown to HTML conversion
Stars: ✭ 91 (+237.04%)
Mutual labels:  pandoc
pandocker
🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar
Stars: ✭ 118 (+337.04%)
Mutual labels:  pandoc
emacs-habitica
Emacs Extension for Habitica
Stars: ✭ 61 (+125.93%)
Mutual labels:  org-mode
tufte-markdown
Use markdown to write your handouts and books in Tufte style.
Stars: ✭ 82 (+203.7%)
Mutual labels:  pandoc
kerkoapp
A web application that provides a faceted search interface for bibliographies managed with Zotero.
Stars: ✭ 30 (+11.11%)
Mutual labels:  bibliography
slipbox
A static site generator for Zettelkasten notes
Stars: ✭ 32 (+18.52%)
Mutual labels:  pandoc
Eorg
new version: https://github.com/SoftMaple/Editor
Stars: ✭ 27 (+0%)
Mutual labels:  org-mode
talks
Resources to various talks given by 200ok team members at various locations.
Stars: ✭ 33 (+22.22%)
Mutual labels:  org-mode
my-bookshelf
Collection of books/papers that I've read/I'm going to read/I would remember that they exist/It is unlikely that I'll read/I'll never read.
Stars: ✭ 49 (+81.48%)
Mutual labels:  bibliography
xtory
a tool for writing branching nonlinear stories.
Stars: ✭ 14 (-48.15%)
Mutual labels:  writing-tool
arnes-notes
🧠 My working notes.
Stars: ✭ 20 (-25.93%)
Mutual labels:  org-mode

minimd

Minimd is a Vim plugin that helps with writing long Markdown documents by folding sections and showing outlines of their contents.

The 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.

Minimd also has a few other features to make working with long documents easier:

  • Header motion command that ignore code blocks (so don't mistake # comments for headers);
  • 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
  • Shortcuts to simultaneously change the levels of all headers within a fold

Demonstration

Usage

Normal Mode Key Action
Space Fold or unfold the current header.
nSpace Fold all headers of level n.
Tab or ]h Jump to next header.
nTab or n]h Jump to next header of level n.
Shift-Tab or [h Jump to previous header.
nShift-Tab or n[h Jump to previous header of level n.
= Promote header (###).
- Demote header (###).
Enter Add and toggle checkboxes in lists
(-- [ ]- [x]- [ ]).

The header promotion and demotion commands act on all enclosed headers when invoked on a fold.

As 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.

Customization

This plugin can be used with Vim's default Markdown syntax by adding the line let g:default_markdown_syntax = 1 to your vimrc.

The default mappings for this plugin's folding, motion, header promotion and demotion, and task toggling commands are as follows.

nmap <silent><buffer> <Space> :<C-u>MiniMDToggleFold<CR>
nmap <silent><buffer> <Tab> :<C-u>MiniMDNext<CR>
nmap <silent><buffer> <S-Tab> :<C-u>MiniMDPrev<CR>
nmap <silent><buffer> ]h :<C-u>MiniMDNext<CR>
nmap <silent><buffer> [h :<C-u>MiniMDPrev<CR>
nnoremap <silent><buffer> = :MiniMDPromote<CR>
nnoremap <silent><buffer> - :MiniMDDemote<CR>
nmap <silent><buffer> <CR> :MiniMDTaskToggle<CR>
vmap <silent><buffer> <CR> :MiniMDTaskToggle<CR>

Note that, according to :help v:count, the mappings for MiniMDToggleFold, MiniMDNext, and MiniMDPrev must be prefixed with <C-u> 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:

nmap z :<C-u>MiniMDToggleFold<CR>

Exporting Files

Exports to other file types are best done with Pandoc since Minimd strictly adheres to a subset of the overlap between Pandoc's Markdown syntax and the Commonmark specification.

You can easily set keybindings to facilitate repeated exports. For instance, the sequence <Leader>ep could be set to export a PDF of the current Markdown file by adding the line autocmd FileType minimd nmap <Leader>ep :!pandoc -f markdown -o example.pdf '%' to your vimrc. See the Pandoc manual for an overview of its many options.

Related Projects

Minimd started out as an implementation of the header visibility cycling idea from Org Mode (and of Outline Mode before that) for Emacs. If you use Emacs, you should probably use one of those, and it should probably be Org Mode.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].