I was wondering if there is a way to get Sublime Text 2 to autocomplete HTML attributes like in Aptana?
By default, Sublime Text will automatically show the completions popup when a user is editing source code or markup, but not within prose in comments, strings or markups. Pressing the Esc key will hide the completions popup. To manually show the completions popup, press Ctrl+Space.
Sublime has autocompletion already and there's no IntelliSense package.
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.
Autocomplete is enabled by default when you use "<" and your tag and then hit enter. So if you enter <p
and then hit enter it will finish out the tag pair for you... where you will end up with <p></p>
and your cursor will be in the middle. You can change this to tab if you prefer by pasting the following into your Preferences -> Settings - User file:
{ "auto_complete_commit_on_tab": true }
This will override the default value of false for completion on tab. Again that is only if you wish to use tab instead of enter.
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