I'm trying to figure out how to get Sublime 2 to create the following behavior:
Type
<strong
then, upon typing >
Sublime will then immediately print
<strong></strong>
And then your cursor will be placed inside of the tag.
I feel like it did this automatically not more than a few months ago, or maybe I was just hallucinating, or was using a different bundle... but regardless, is there a setting or script I can build that will perform this tag behavior that Aptana gets 100% right but for some reason no other text editor can catch on to?
But there should be some built into sublime. For example, as you start to type <div> , you should see a drop down box with matching snippets. Hit Tab or Enter to pick one and arrow keys to go up or down in the list. For html tags, it will automatically adds the closing tag and puts the cursor in between them.
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).
You can select some text and then choose Edit > Tag > Wrap Selection with tag from the menu (or use the key binding you'll see when you look there) to do this.
To wrap your selected content with a html tag, just selected your text, then press Alt-Shift-W. You'll then have the option to fill in the front and back tag simultaneously.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With