Reputation: 34013
I would like to have this work flow working with HTML in Sublime Text 2:
Resulting with this (the word "HERE" indicates where the cursor should be):
<p>
HERE
</p>
But instead this is what I get (the word "HERE" still indicating the cursor's position):
<p>
HERE</p>
Which demands you to
Upvotes: 2
Views: 2698
Reputation: 19744
Try adding the following in your user key bindings.
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selector", "operator": "equal", "operand": "meta.scope.between-tag-pair", "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
]
}
Upvotes: 7