Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

HTML tag highlight added. #4504

Merged
merged 2 commits into from
Sep 3, 2013
Merged

HTML tag highlight added. #4504

merged 2 commits into from
Sep 3, 2013

Conversation

sathyamoorthi
Copy link
Contributor

Tag highlight functionality added.

Image

_some tracks_
Google Group Discussion
Trello Card
#3069

Code mirror's matchTags extension only highlight the other tag. In the above screenshot, i put cursor on start tag <form, but it only highlights the other tag </form>. If you want to to highlight both tags, i can rewrite this extension for brackets.

@ghost ghost assigned larz0 Jul 18, 2013
@njx
Copy link

njx commented Jul 18, 2013

To @larz0 to review the UX and make suggestions.

@larz0
Copy link
Member

larz0 commented Jul 18, 2013

This is awesome @sathyamoorthi. I'm wondering if we could make it so that it highlights the end tag when the cursor is anywhere within > and < so that we don't have to consciously target the tag name when the start tag is long due to attributes. Thoughts?

@sathyamoorthi
Copy link
Contributor Author

@larz0 ahhh. yes. let me check this.

@sathyamoorthi
Copy link
Contributor Author

@larz0 Committed necessary changes to CodeMirror. Please check now.

@larz0
Copy link
Member

larz0 commented Jul 25, 2013

@sathyamoorthi the UX is much better now, thanks. We'll get someone to review the code.

@ghost ghost assigned JeffryBooher Jul 30, 2013
@JeffryBooher
Copy link
Contributor

@sathyamoorthi @larz0 can we highlight both tags? I find it a little unbalanced if we just highlight the one. We already highlight open and close brace and other editors highlight open and close tags.

@larz0
Copy link
Member

larz0 commented Aug 16, 2013

@JeffryBooher Sounds good.

@sathyamoorthi
Copy link
Contributor Author

@JeffryBooher See this pull request codemirror/codemirror5#1653.

@marijnh commented.

"I prefer the way things look when only the 'other' tag is highlighted, so I'm going to keep the
addon in the distribution the way it is."

So i could ask him or gave pull request to CodeMirror to add an option to highlight both tags OR i can customize that add-on for brackets.

Need your opinion.

@JeffryBooher
Copy link
Contributor

@njx what do you think? Larz and I agree that it looks more balanced with both open and close tags highlighted but which option do we go with? I'm not as familiar with how code-mirror works and the politics around changing the code-mirror code base but it sounds like we may have to do the work ourselves. @sathyamoorthi already has some of the code done (sans the performance enhancement) it would be pretty straight forward to just take that change.

I guess the other option is that we fork the addon and create a new one with a different name and it's never committed back to code-mirror.

@TomMalbran
Copy link
Contributor

Maybe Marijnh would accept the change it was made as an option on the addon, and not active by default? Which would leave the behavior as it is by default and add the one we desire with an additional option. Might be worth asking him first.

@sathyamoorthi
Copy link
Contributor Author

@TomMalbran @JeffryBooher yes. i prefer this. Let me ask him in codemirror discussion. He is nice guy, he'll do it. I hope.

@JeffryBooher
Copy link
Contributor

@sathyamoorthi excellent!

@sathyamoorthi
Copy link
Contributor Author

@marijnh accepted this patch.
codemirror/codemirror5#1781

@JeffryBooher @larz0 I committed an option to highlight both tags. Please check.
sathyamoorthi@0cb9eb7

@JeffryBooher
Copy link
Contributor

Nominating for Sprint 31

@JeffryBooher
Copy link
Contributor

@sathyamoorthi can you merge master into this branch so I can test it with the latest codemirror?

@JeffryBooher
Copy link
Contributor

@sathyamoorthi disregard. I just merged your changes into a new branch and merged master in to that. Looks good!

@JeffryBooher
Copy link
Contributor

Merging this into master. Looks like the travis build error is benign.

JeffryBooher added a commit that referenced this pull request Sep 3, 2013
@JeffryBooher JeffryBooher merged commit 72aa6c0 into adobe:master Sep 3, 2013
@lovebdsobuj
Copy link

Tag Highlight very important and useful Extension...
Like this any Extension have Adobe Brackets...?
https://github.com/facelessuser/BracketHighlighter?files=1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants