The beauty of vim, for me, is its adherence to the Unix Philosophy, which allows me to call external programs from within vim to accomplish something.
In this use-case, I can use doctoc CLI in any number of ways:
:! doctoc %
:TocGH/:TocGL/:TocBB commands and custom function that call the respective doctoc flags (which can subsequently be automatically called on BufWritePre event on markdown filetypes)
:make md-toc make target that calls doctoc .
or finally as a pre-commit git hook
Another demonstration of vim's composability is this blog article posted a few days ago
Nice. I used to use that plugin.
The beauty of vim, for me, is its adherence to the Unix Philosophy, which allows me to call external programs from within vim to accomplish something.
In this use-case, I can use doctoc CLI in any number of ways:
:! doctoc %
:TocGH
/:TocGL
/:TocBB
commands and custom function that call the respectivedoctoc
flags (which can subsequently be automatically called onBufWritePre
event on markdown filetypes):make md-toc
make target that callsdoctoc .
Another demonstration of vim's composability is this blog article posted a few days ago
Yea, you are right, I like that about vim. Another example of that composition I use every now and then is editing a file in binary form:
:%!xxd
And then back:
::%!xxd -r