I notice several problems with auto tag completion.
- Popup tag completion window give all tags, not just those which are valid at this location. This makes the pop-up more of a nuisance than an aid.
- You have to hit return to get out of the pop up. Pop up should exit when you type ">".
- Cursor is in the wrong position when you close a tag. The first thing you should do after opening a tag is close it to keep the document in a valid form. Thus, when you close a tag, you should have the option of moving the cursor before the closing tag. I.E. I type < h 3 > < / and it produces:
<h3>|</h3>
where the vertical bar is the cursor position.
- In fact, it should normally insert the closing tag as soon as you insert the opening tag (configurable). Sometimes, this is not desirable when you are adding tags to existing text but when you are typing new text this is the appropriate mode of operation. A button to quickly switch between the two modes is good.
- When completing attributes, the cursor ends up in the right place (inside quotes) but you have to press return to get rid of "CDATA" popup. If you finish typing the name and hit "=", it should fill in the quotes.
- The tab key is also a natural way to tell the program to autocomplete. This is consistent with bash. So it should be recognized.
-If it has autocompleted the quotes and you type an opening and/or ending quote, they should be ignored (but the cursor should advance for the closing quote.
- Right arrow must also exit autocomplete popup menu.
- If I have a url, and I add the following markup to it:
<a href="http://www2.epcc.ed.ac.uk/~spb/xmountains/">
The program does the wrong thing. It converts the ">" to ">". If I put a space between the quote and the greater than sign, then it doesn't do it.
Autocomplete should do the right thing if you basically type what you would have without it, as much as possible. It can fill in stuff for you. If you type a closing tag that has already been autocompleted it can eliminate the redundant closing tag. Going one step further, if you type "</" and the program fills in "p>" and you also type "p>", it can eliminate the redundant characters (">" is not valid as body text, anyway).
Thus when the user types ">" a construct such as "</p>p>" gets converted to "</p>". The program can keep track of the most recent autocomplete so it doesn't try to do this if you are typing, for example, a shell code or C code example and it should only do it when the construct looks like </(.*)>\1> in regular expression terms (i.e. </x>x> where x is any valid tag name string.
Also, if I change (in xhtml) an <h2> to an <h3>, until I fix the closing tag to match the program shows the entire document as in error, rather than the section that is actually broken (the </h2> tag). It also does this every time you start to insert a tag (and the text is <>). If you have
<body>
<p>
</body>
The error is at "</body>", not the whole document.
Indenting 8 spaces after a <h2></h2> is uncool.
When running tidy to check for errors, the program seems to lack the ability to jump to the next error (like emacs ESC`) in both the output and the input. You should also be able to click on an error and also have it put the cursor at the position of the error. Also, it should immediately jump to the next error.
Tidy output window should be scrolled to the beginning, not the end. You can't see the "No warnings or errors were found" and if there were errors, you want to see the first error, not the last, and you certainly don't want to see the "To learn more about HTML Tidy ..." junk.