I have been reviewing a number of HTML editors. The best was Dreamweaver when it comes to autocompletion. They did not get it quite right.
Here is how I think it should work.
When you type </ the editor should look to the left for the innermost nested unclosed tag, and autotype that, in lower case (unless you have upper case tags configured).
e.g.
<div> <span class="alien">Greetings!</span> </div>
If you type <div> it should not autocomplete right away the way CSE does now typing the full </div>. It should wait until you type </
If hit BS, that should inhibit that particular autotype.
For analysing problems, you should be able to point the cursor anywhere, and right click analyse. Then you see a summary display of the tag nesting, with missing tags shown in red, e.g.
<blockquote> <p> <span> (here) </span> </p> </blockquote>
You can click on any element in the analyse display to jump to the document where it is, or roughly should be. If you know precisely where a missing tag should go, it should be displayed in different colour, and that tag or all such tags should be autofixable.
You should then be able to insert the missing tag with a single keystroke.
auto completion, and tag balancing
-
- Rank V - Professional
- Posts: 367
- Joined: Fri Feb 17, 2006 5:22 am
- Location: Victoria BC Canada
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: auto completion, and tag balancing
Thanks. Some good ideas.
Here's what I may be able to do soon in order to improve things:
1. Instead of autotyping the end tag, assign it to a special key combination like Alt+/ and when that is hit, then the end tag (that would have otherwise been autotyped when the '>' character is pressed for the start tag) is inserted at the cursor point.
2. Optionally, in addition to 1, If '</' is typed then the end tag could be completed at that point. If it's unwanted, then Ctrl+Z should undo.
How does the above sound?
The analyze suggestion is nice, but I don't think I'll be able to do that for v10. There is already a "document structure window" that does display the document structure and you can click on different lines to go to the respective place in the document. Not as automatic as your suggestion but it may be helpful.
Here's what I may be able to do soon in order to improve things:
1. Instead of autotyping the end tag, assign it to a special key combination like Alt+/ and when that is hit, then the end tag (that would have otherwise been autotyped when the '>' character is pressed for the start tag) is inserted at the cursor point.
2. Optionally, in addition to 1, If '</' is typed then the end tag could be completed at that point. If it's unwanted, then Ctrl+Z should undo.
How does the above sound?
The analyze suggestion is nice, but I don't think I'll be able to do that for v10. There is already a "document structure window" that does display the document structure and you can click on different lines to go to the respective place in the document. Not as automatic as your suggestion but it may be helpful.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: auto completion, and tag balancing
Please try v10 BETA 2:roedygr wrote:If you type <div> it should not autocomplete right away the way CSE does now typing the full </div>. It should wait until you type </
http://www.htmlvalidator.com/htmlval/ht ... nload.html
You can now set it to auto-type the end tag after you type "</"... or you can use Ctrl+. to insert the entire end tag.
If you try it, then please let me know how it works. Thanks!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial