-
Hi, I was trying to create new thing object and notice that function My question is I can create a brackets thing that will match all kinds of brackets by using this "MULTI-EXPR"? Edit: I tried out with something like this: (meow-thing-register 'brackets
'((pair ("(") (")"))
(pair ("[") ("]"))
(pair ("{") ("}")))
'((pair ("(") (")"))
(pair ("[") ("]"))
(pair ("{") ("}")))) Which can match brackets, but it will always prioritize the round brackets over square ones, and again over curly ones... so for some thing like this:
will match the outer most round brackets first, even if the cursor position is in the most deep nested curly brackets. What is the intended use of it anyway? And is there a preferred way to "merge" multiple thing into one? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In a PAIR EXPR, each pair takes TOKENS, which are lists that can have multiple elements , like this: (meow-thing-register 'brackets
'(pair ("(" "[") (")" "]"))
'(pair ("(" "[") (")" "]"))) As far as i know, you can probably achieve the same thing by using a REGEXP-EXPR and using a bunch of conditionals. You might also be able to do it by using the syntax-table descriptions for opening delimiter and closing delimiter, which should be sanely defined per-mode. However, this functionality is typically achieved by My issue with meow-block a while ago was that it does not let you immediately select the nesting level you are on, it instead snaps to the next deepest level, and you need to press it twice to get to your original level. Eventually though, I realized that most operations that involve doing specific operations at a specific nesting level can be achieved more smoothly via paredit, smartparens, and/or embrace. |
Beta Was this translation helpful? Give feedback.
In a PAIR EXPR, each pair takes TOKENS, which are lists that can have multiple elements , like this:
As far as i know, you can probably achieve the same thing by using a REGEXP-EXPR and using a bunch of conditionals. You might also be able to do it by using the syntax-table descriptions for opening delimiter and closing delimiter, which should be sanely defined per-mode.
However, this functionality is typically achieved by
meow-block
andmeow-block-expand
, is something missing from those commands that you'd like to see?My issue with meow-block a while ago was t…