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

Support non-word values for cyclic pattern #3

Open
xigoi opened this issue Mar 1, 2023 · 1 comment
Open

Support non-word values for cyclic pattern #3

xigoi opened this issue Mar 1, 2023 · 1 comment

Comments

@xigoi
Copy link

xigoi commented Mar 1, 2023

It would be nice to be able to do something like this:

patterns[{ "&&", "||" }] = { priority = 10 }
patterns[{ "<", ">" }] = { priority = 10 }

It seems that currently only words (made up of word characters) can be cycled.

@xigoi xigoi changed the title Supports non-word values for cyclic pattern Support non-word values for cyclic pattern Mar 2, 2023
@zegervdv
Copy link
Owner

zegervdv commented Mar 3, 2023

Currently I'm using matchstrpos() with the \k to match on keyword boundaries.
It seems that && and the likes are in most cases not considered as part of a keyword.
I think if you add & to the iskeyword list, it will probably match, but that will have some unwanted side-effects.

So, I need to figure out how to combine both usecases.

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

2 participants