Html Tag highlighting
Html Editors have the ability to highlight an entire tag when you choose or click on the opening tag, e.g. a <div>. This is an undispensable feature for Html editing, comparable to matching brackets in programming languages. So I'd very much like to see it.
8 comments
-
Dave Ackerman
commented
This works perfect! Thanks.
-
zappa
commented
To compliment this feature, a "find matching element" function (similar to find matching brace, but for jumping the cursor from <div> to </div> for example) would be really useful. ctrl+shift+B?
-
Adminajpalkovic
(Admin, E Text Editor)
commented
Alright, I think I'm done, and I'm quite happy with how it works.
I don't know if there are any plans to make another release before version 2. If you want to try it out, I put my e executable here: http://aj.palkovic.net/e.zip . Just make a backup of the one in Program Files/e and then replace it with this one. A word of caution, its a 'debug' build, so it will be slow.To turn it on, go to Settings and select the "Highlight matching html tags" option. The keyboard shortcut is Ctrl-comma.
-
Admincharlesroper
(Admin, E Text Editor)
commented
The keyboard shortcut I think would make sense is Ctrl-, (that's a comma) because that key also has the left angle bracket (<) symbol which makes a nice mnemonic.
-
Admincharlesroper
(Admin, E Text Editor)
commented
@ajpalkovic Here's an example of what I mean for each point: #1: if I move the cursor somewhere within the word "content" as seen in your example, hitting the "select tag content" shortcut would select the word "content". #2: Hitting it again would select "<p>content</p>" (i.e., the content of the <div> tag. #3: Hitting it again would select everything within the parent of the <div> tag. If the parent of the <div> tag is, for example, the <body> tag, it would select the content of the <body> tag.
Does that make sense? It's the same as Zen Coding "Match Pair" feature, which you can play around with here: http://zen-coding.ru/demo/ Create a few tags and hit Ctrl-M to play around with it.
-
Adminajpalkovic
(Admin, E Text Editor)
commented
I've implemented most of this, I just have a few quick questions to finish it up.
Do you have suggestions for which keys to use for the 1 and 2?
I'm confused about how 3 should work. Is the idea that if u click inside of one tag and press some keyboard shortcut that it deletes the tag's parent? For example:
<div><p>content</p></div> becomes: <div>content</div> -
Admincharlesroper
(Admin, E Text Editor)
commented
Related to this, I would also like to keyboard shortcuts to:
1. select tag content;
2. select tag content + the opening and closing tag;
3. expand currently selected tag content to to parent tag content -
webpurism
commented
This feature would make e the most awesome web-editor of all time. Loving it! Keep up the good stuff, guys. :)