Auto Complete for end tag

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
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".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
John

Auto Complete for end tag

Post by John »

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". :)
Guest

Post by Guest »

actually it would be even better if there would be a shortcut, that we could use to close the current tag ..

I mean let's say I type
<table>
<tr>
<td>
blah
[shortcut] - </td> is typed automatically
[shortcut] - </tr> is typed automatically
[shortcut] - </table> is typed automatically
Bud

Auto-close

Post by Bud »

I would like to see the above extended by autoinsert automatically adding the close tag.

So, typing

Code: Select all

<table>
would make

Code: Select all

<table>
</table>
with the cursor in the middle.
Then typing

Code: Select all

<table>
<tr>
</table>
would make

Code: Select all

<table>
<tr>
</tr>
</table>
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:

Code: Select all

This is a test
If I want to insert a bold tag at the beginning, the autoinsert must not execute.

Code: Select all

<b>This is a test
Underdog
Posts: 6
Joined: Tue May 27, 2003 6:26 pm
Location: Orem, UT, USA
Contact:

Auto-complete ending tag

Post by Underdog »

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.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Underdog is right. I need to think about this.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Finally I have made decision. Tag completion will work close to somewhat like Bud suggested.
Karlis Blumentals
Blumentals Software
www.blumentals.net
jhemps
Posts: 8
Joined: Wed Aug 25, 2004 4:38 pm

Post by jhemps »

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
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.
Post Reply