Search code examples
htmltagselementadobe-brackets

How do you accept the automated HTML tags from Brackets text editor?


Can somebody please explain in detail how to accept the automated tags that Brackets suggests/adds?

Example: I start typing out an element...

<abbr title="World Health Organization">

and immediately Brackets will add an ending tag...

<abbr title="World Health Organization"></abbr>

where my cursor is between the opening and closing tags. It's perfect because I can just type out the abbreviated content...

<abbr title="World Health Organization">WHO</abbr>

However, this is where I have a problem. My mouse is at the end of the content and right before the closing tag. If I press the "Tab" key, then suddenly Brackets turns my abbreviated content into another tag...

<abbr title="World Health Organization"><WHO></WHO></abbr>

If I instead try pressing the "Enter" key, then Brackets just makes a new line for my cursor...

<abbr title="World Health Organization">WHO

and my cursor is still stuck before the ending abbr tag. I want to accept the ending tag Brackets added and move on. If I were to just type the ending tag anyway, ignoring the tag Brackets added, then I will have two ending tags...

<abbr title="World Health Organization">WHO</abbr></abbr>

At this point, I'm guessing when you're done typing the content, and Brackets has that ending tag added automatically, you just use your mouse to move the cursor past the ending tag to keep coding?

Or if you want to stay typing on your keyboard, you move your hand to the arrow keys and press the right arrow 7 times until the cursor is past the ending tag that Brackets added to keep coding?

If this is the case, then it seems more efficient to use Notepad to just type the ending tags yourself. I just feel like I'm missing something extremely simple that everyone else gets and is efficient using, and I can't find any answer beyond "just use tab" or "just use enter." Thanks to anyone who helps!


Solution

  • There is a key in your keyboard called "End". Press that key when you need to go to the end of any line. It doesn't matter where you are writing, it'll send your caret to the end of the line. So that you can press enter then.

    And The "Home" key does the opposite. It sends the caret to the start of a line.

    Have a great day.