post image :date_long | 1 min Read

How to generate TOC by calling external sh

 cat ~/bin/tocreadme.sh
#!/bin/bash

grep "<\!--" $1 | sed -E 's/^(<!--)(.*)(-->)/\2/'

cat ~/.vimrc

...
nmap <leader>c :read! sh tocreadme.sh ~/Documents/sbx/aws-eks-devopsinuse/README.md <CR>

...
:wq!
author image

Jan Toth

I have been in DevOps related jobs for past 6 years dealing mainly with Kubernetes in AWS and on-premise as well. I spent quite a lot …

comments powered by Disqus