Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swoop as toc for python, lisp and latex #169

Open
fab6 opened this issue Nov 25, 2019 · 4 comments
Open

swoop as toc for python, lisp and latex #169

fab6 opened this issue Nov 25, 2019 · 4 comments

Comments

@fab6
Copy link

fab6 commented Nov 25, 2019

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
Copy link
Collaborator

conao3 commented Nov 25, 2019

Maybe you want imenu. There are leaf integration for imenu. conao3/leaf.el#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
Copy link
Author

fab6 commented Nov 26, 2019

ok, thanks, that makes sense

@cireu
Copy link
Collaborator

cireu commented Nov 26, 2019

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
Copy link
Collaborator

conao3 commented Dec 24, 2019

This issue solved? I can close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants