4 ms·
:g/^#/p for markdown at least.
by syrrim 8y ago
:g/^#/p
for markdown at least.
- AndrewOMartin 8y agoIf you put a #after the p you'll get the line numbers of the instances too, and you can jump to them with :num. So for LaTeX if I do... :g/^\\\(sub\)*section/p# I get... 35 \section{Introduction} 37 \section{Setup} 39 \subsection{CSS Setup} 66 \subsection{JS Setup} 74 \subsection{HTML Setup} 92 \subsection{React setup} 113 \section{Components} 261 \subsection{Card Box} 541 \section{Old Chunks} 562 \section{Index} 566 \section{Code Chunks} and... :92 Takes me to the React Setup subsection.