Sublime Forum

Nested Include Syntax

#1

Hi everyone ! I’m trying to do my own syntax but there is something I don’t really understand:
How do you make nested include without using begin/end with patterns ?
For exemple because I always explain not very well, if I place in my repository the object A and B, how I’m supposed to do for highlight A or with B if it follows A ? Here’s the code that I thought correct for doing that.

0 Likes

#2

Have you considered using the “new” sublime-syntax format? Here is the official documentation, which may help you: http://www.sublimetext.com/docs/3/syntax.html

0 Likes

#3

There aren’t solution with the “old” ? And what’s the solution for this exemple with the new ?

0 Likes

#4

I don’t want to create a new file in YAML, a language I don’t know :confused: Just tell me a solution with patterns or something like that please :blush:

0 Likes

#5

Up ! Does anyone have the answer ?

0 Likes

#6

I don’t understand your question. Please explain what you want to do, preferably with your particular example.

(I won’t be back until Monday, but maybe others can work with that information.)

0 Likes

#7

Thanks for your reply :smiley: I want to know what I need to write for highlight B objects only if they have an A object juste before

0 Likes

#8

Please give a concrete example of what you have and what you want to happen. This makes it so much easier for us to understand what you really need.

0 Likes

#9

I don’t understand as well. But I’m guessing the question is asking for a highlight repeat selection like what

Ctrl+D

does, - But that it searches up instead of down??

Another easier answer might just be to do something like:

Ctrl+F, “>[a-zA-Z]</”, Alt+Enter

?

0 Likes

#10

Ok, I’ll try to be understood.
I place in my repository the object “A” which contains “i”, the object “B” which contains “love” and the object “C” which contains “potatoes”.
With these elements, I try to highlight the sentence “I love potatoes” but the trick is that the sentence can be match while one or two of the lasts words are forgotten.

Sentences which should work:

  • i
  • i love
  • i love potatoes

All other ways don’t match

0 Likes

#11

I don’t understand at all, why you give shortcuts ? I need a syntax example :worried:

0 Likes

#12

No one knows what you are talking about, if you can’t bother to explain the problem no one is going to help you.

0 Likes

#13

I know. I did it yesterday…

0 Likes

#14

Up ! I tried to explain, I hope somebody will understand me :sweat_smile:

0 Likes

#15

Up, please help me !

0 Likes