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

meow-thing-register support keyword pair-regexp & add new thing code-block #683

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

jixiuf
Copy link
Contributor

@jixiuf jixiuf commented Dec 1, 2024

meow-thing-register support keyword pair-regexp

pair-regexp works similarly to pair, but while pair uses ordinary strings,
pair-regexp utilizes regular expressions.

an example

    (meow-thing-register 'code-block
                         '(pair-regexp ("{[\n\t ]*")  ("[\n\t ]*}") )
                         '(pair ("{") ("}")))

inner thing of code-block
look like:
图片
instead of
图片

this is usable when I want to call meow-grab on all fields of a struct.

`pair-regexp` works similarly to `pair`, but while `pair` uses ordinary strings,
`pair-regexp` utilizes regular expressions.
@DogLooksGood
Copy link
Collaborator

pair-regexp looks good to me.

But code-block doesn't work in many languages. I remember in kak, it uses a concept called indentation? So basically select the statements starts with same indentation, it's not limited to C-like languages.

@jixiuf jixiuf force-pushed the thing--pair-regexp branch from 324b325 to 2ae8212 Compare December 1, 2024 15:48
@jixiuf
Copy link
Contributor Author

jixiuf commented Dec 1, 2024

pair-regexp looks good to me.

But code-block doesn't work in many languages. I remember in kak, it uses a concept called indentation? So basically select the statements starts with same indentation, it's not limited to C-like languages.

ok I removed the code-block

@DogLooksGood DogLooksGood merged commit 6d94efb into meow-edit:master Dec 1, 2024
2 checks passed
@jixiuf jixiuf deleted the thing--pair-regexp branch December 2, 2024 16:06
jidibinlin pushed a commit to jidibinlin/meow that referenced this pull request Jan 2, 2025
`pair-regexp` works similarly to `pair`, but while `pair` uses ordinary strings,
`pair-regexp` utilizes regular expressions.
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

Successfully merging this pull request may close these issues.

2 participants