Skip to content
Browse files

Improve bf/emph/ul snippets if ivoked with key combo and no selection

  • Loading branch information...
1 parent c1c04c0 commit 2dbbd710751a3bc80f2f19f434f626928741dd3d @msiniscalchi msiniscalchi committed Oct 21, 2012
View
2 Text boldface.sublime-snippet
@@ -1,7 +1,7 @@
<snippet>
<description>Boldface text</description>
<content><![CDATA[
-\\textbf{$SELECTION}
+\\textbf{${1:$SELECTION}}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
View
2 Text emphasize.sublime-snippet
@@ -1,7 +1,7 @@
<snippet>
<description>Emphasize text</description>
<content><![CDATA[
-\\emph{$SELECTION}
+\\emph{${1:$SELECTION}}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
View
2 Text underline.sublime-snippet
@@ -1,7 +1,7 @@
<snippet>
<description>Underline text</description>
<content><![CDATA[
-\\underline{$SELECTION}
+\\underline{${1:$SELECTION}}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
View
2 Wrap in command.sublime-snippet
@@ -1,7 +1,7 @@
<snippet>
<description>Wrap selection in LaTeX command</description>
<content><![CDATA[
-\\${1:cmd}{$SELECTION}
+\\${1:cmd}{${2:$SELECTION}}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
View
2 Wrap in environment.sublime-snippet
@@ -1,5 +1,5 @@
<snippet>
- <description>Wrap selection in LaTeX environment</description>
+ <description>Turn selection into LaTeX environment</description>
<content><![CDATA[
\\begin{${1:env}}
$SELECTION
View
3 messages/7.txt
@@ -2,7 +2,8 @@ LaTeXTools Plugin version 2012-10-14 changelog:
New features:
--
+- The emphasize/bold/underline shortcuts (C-l,C-e and friends) now activate the corresponding
+ snippet, with the cursor inside the braces, if there is no selection.
Bugs fixed:

0 comments on commit 2dbbd71

Please sign in to comment.
Something went wrong with that request. Please try again.