facelessuser / BracketHighlighter

Bracket and tag highlighter for Sublime Text
https://facelessuser.github.io/BracketHighlighter/
1.75k stars 245 forks source link

Support tagnameselect in *.vue files #565

Closed Darkside73 closed 1 year ago

Darkside73 commented 4 years ago

Description

Command bh_modules.tagnameselect does not work in vue files

Support Info

Steps to Reproduce Issue

  1. Create vue file with template section and some tags in it
  2. Put cursor on tag
  3. Run bh_modules.tagnameselect
facelessuser commented 4 years ago

Does tag matching work in vue? I suspect it doesn't.

Darkside73 commented 4 years ago

Do not quite understand your point. *.vue file has an HTML code inside a template tag. How it different from a regular html file? In fact when I set syntax to HTML it starts working

facelessuser commented 4 years ago

Vue is a template syntax. That templating syntax may mess up HTML patterns and prevent BH from working.

If you set a Vue file to HTML syntax, it will start working. I specifically don't do it by default because I don't want to deal with the questions of why, when a person uses Vue syntax that breaks BH's ability to match a tag, feature x, y, or z stops working, or doesn't work as expected.

If you want to enable it, you can modify the bh_core.sublime-settings and override the angle rule to accept the Vue syntax. This would be done in user_brackets so you can just override that part of the rule (see docs).

You may need to update bh_tag.sublime-settings (the tag module's options) and add your Vue syntax to tag_mode.

@gir-bot add T: support @gir-bot remove S: triage