I've recently converted from E-Texteditor and one of the only features i miss it the ablity to wrap a selection in a html tag.
I would highlight the selection > press ctrl alt w > and type the tag letters "p". Is this possible with sublime?
barty wrote:when I do that, it just replaces the selection with the tag (e.g., 'p') and tab, literally. syntax is set to html.
<!-- Insert open/close tab - textmate way -->
<binding key="ctrl+comma" command="insertSnippet 'Packages/PowerUser/Snippets/HTML/textmate_tag.sublime-snippet'">
<context name="selector" value="text.html - source, text.xml"/>
</binding><snippet>
<content><![CDATA[<${1:p}>${0:$SELECTION}</${1/\s.*//}>]]></content>
</snippet>barty wrote:Jon, I think I found a possible bug.
I did a clean reinstall to find where the problem is and traced it to my keymap file. If I use mine keymap instead of Default, it breaks the tag wrap behavior. So I copied Default.sublime-keymap to temp.sublime-keymap to get a fresh restart. But without changing anything else, just setting
keymap temp
in Application.sublime-options breaks the tag wrap.
Then I copied and pasted my keymap file into Default.sublime-keymap and set it back to
keymap Default
and the wrap tag behavior is OK!
Users browsing this forum: No registered users and 25 guests