Add rule to SourceCookifier plugin for notepad++

2019-08-11 09:03发布

问题:

I am trying to add a rule in SourceCookifier for CSS language.

Currently it shows the tree list of

  • classes
  • Selectors
  • Identities

But I want to add my own rule,

I will add some comments, like:

/* Start Reset */
-- css rules here
/* End Reset */

/* Start Sidebar */
-- css rules here
/* End Sidebar */

And now I want show my own function tree called section

Thanks fro help

回答1:

I'm not confident that I understand your question, but here is what I believe you're looking for.

Bring up the language settings for CSS and add a new tag type. Set the description to "section" (or whatever you like).

For Input, use: /* Start (\w+)

For Output, use: \1

If you apply this rule to a file that contains the sample code you provided, this will create sections called "Reset" and "Sidebar." Is that the effect you're trying to achieve?