
Auto Complete for end tag
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Auto Complete for end tag
When coding in HTML I discovered that Auto Complete does not suggest anything when I am closing the tag (for example when I write </body>). It could be useful if after I write "</b" Auto Complete would suggest me all closing tags that start with letter "b". 

Auto-close
I would like to see the above extended by autoinsert automatically adding the close tag.
So, typing would make
with the cursor in the middle.
Then typing
would make leaving the cursor in the middle, etc.
Note, this must be automatically disabled if there is text on the line where you type the tag, for example:
If I want to insert a bold tag at the beginning, the autoinsert must not execute.
So, typing
Code: Select all
<table>
Code: Select all
<table>
</table>
Then typing
Code: Select all
<table>
<tr>
</table>
Code: Select all
<table>
<tr>
</tr>
</table>
Note, this must be automatically disabled if there is text on the line where you type the tag, for example:
Code: Select all
This is a test
Code: Select all
<b>This is a test
Auto-complete ending tag
Programming idea/warning:
In the first idea presented by "Guest", the ending tag would have to automatically match the indentation of the opening tag. The underlying code would have to figure out, "Is the opening tag on the line I'm on, or some line above this one?" In the first case, the closing tag would be inserted at the cursor. In the latter case, another question would have to be asked, "Is there other text on this line or not?" In the first case, a carriage return would be entered, and the tag's indentation would match the opening tag's. In the latter case, only the indentation would have to adjust because the user has probably pressed return already. Then the closing tag would be typed.
Guest "Bud"'s idea is probably easier to program. However, there shouldn't be an automatic line feed as he suggests, in case the user wanted an inline tag (like <b>|</b>, where | represents the cursor position). He's right, though, about not automatically inserting a closing tag when text immediately follows. This would require, then, that closing tags also be in the list of auto-complete tags for when the user moves to the end of the line to finish off the bold.
In the first idea presented by "Guest", the ending tag would have to automatically match the indentation of the opening tag. The underlying code would have to figure out, "Is the opening tag on the line I'm on, or some line above this one?" In the first case, the closing tag would be inserted at the cursor. In the latter case, another question would have to be asked, "Is there other text on this line or not?" In the first case, a carriage return would be entered, and the tag's indentation would match the opening tag's. In the latter case, only the indentation would have to adjust because the user has probably pressed return already. Then the closing tag would be typed.
Guest "Bud"'s idea is probably easier to program. However, there shouldn't be an automatic line feed as he suggests, in case the user wanted an inline tag (like <b>|</b>, where | represents the cursor position). He's right, though, about not automatically inserting a closing tag when text immediately follows. This would require, then, that closing tags also be in the list of auto-complete tags for when the user moves to the end of the line to finish off the bold.
I agree...this is the one thing that is stopping me turning on the auto-completion of html tags option. The auto-complete is very anoying when trying to insert html tags into existing text.Note, this must be automatically disabled if there is text on the line where you type the tag, for example:
Code:
This is a test
If I want to insert a bold tag at the beginning, the autoinsert must not execute.
Code:
<b>This is a test