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

allow specifying an elisp function to provide folded-state-text based on first line of fold #78

Open
edgimar opened this issue Oct 19, 2018 · 0 comments

Comments

@edgimar
Copy link

edgimar commented Oct 19, 2018

It would be nice to be able to specify a regular expression (or more generally an elisp function) that would be applied to the first folded line in order to extract some portion of that line for showing as the origami-fold-replacement text for a particular fold.

In other words, if I have:

# {{{
def foobar(a, b, c):
    pass
# }}}

then after folding, I should be able to see:

# {{{ foobar(a, b, c) ... }}}

provided that I have set up an appropriate elisp function to convert the first line into the replacement text.

Or it might be even better to be able to replace the entire folded-state line, and not just the stuff between {{{ and }}}, so you could have something like the following if you want:

# ---- def foobar(a, b, c) ... ----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant