How to generate TOC by calling external sh
How to generate TOC by calling external sh
1
2
3
4
5
 cat ~/bin/tocreadme.sh
#!/bin/bash
grep "<\!--" $1 | sed -E 's/^(<!--)(.*)(-->)/\2/'
1
2
3
4
5
6
7
cat ~/.vimrc
...
nmap <leader>c :read! sh tocreadme.sh ~/Documents/sbx/aws-eks-devopsinuse/README.md <CR>
...
:wq!
 This post is licensed under  CC BY 4.0  by the author.
