emacsorphanage / helm-swoop

Efficiently hopping squeezed lines powered by Emacs helm interface
GNU General Public License v3.0
689 stars 55 forks source link

swoop as toc for python, lisp and latex #169

Open fab6 opened 4 years ago

fab6 commented 4 years ago

Hi,

I would like to use helm-swoop as a kind of toc tool for several modes like python, lisp and latex?

E.g. I would set for python the following outlines: 1st header: #= 2nd header: #- 3nd header: #.

similar for lisp: 1st header: ;= 2nd header: ;- 3nd header: ;.

And for latex, e.g.: 1st header: \section 2nd header: \subsection 3nd header: \subsection

So for my understanding, one would need different pre-inputs for the 3 headers and its active mode. I am not sure if this is correct and actually do not know how to do this... Does anyone have a suggestion how I could achieve this?

Best Regards Fab

conao3 commented 4 years ago

Maybe you want imenu. There are leaf integration for imenu. https://github.com/conao3/leaf.el/pull/300 If you write some definitions for it, you can use imenu for the toc. And there are helm-imenu, so the purpose is out of this package purpose.

fab6 commented 4 years ago

ok, thanks, that makes sense

cireu commented 4 years ago

If you want to use swoop to skim some header line. you can use something like<HEADER-RE> <CONTENT-RE>. Insert a space between two regexp can ask swoop to filter out lines that match both of two re.

conao3 commented 4 years ago

This issue solved? I can close this?