Skip to content

Commit bfc4dd3

Browse files
committedJan 22, 2019
add dbg exit field, add error warn
1 parent 5ae38f2 commit bfc4dd3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
 

‎snippets/dbg.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<snippet>
2-
<content><![CDATA[dbg!($0)]]></content>
2+
<content><![CDATA[dbg!($1);$0]]></content>
33
<scope>source.rust</scope>
44
<tabTrigger>dbg</tabTrigger>
55
<description>dbg!(…)</description>

‎snippets/error.sublime-snippet

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<snippet>
2+
<content><![CDATA[error!("${1:\{${2::?}\}}"${1/([^\{])*(\{.*\})?.*/(?2:, :\);)/}$3${1/([^\{])*(\{.*\})?.*/(?2:\);)/}]]></content>
3+
<scope>source.rust</scope>
4+
<tabTrigger>error</tabTrigger>
5+
<description>error!(…)</description>
6+
</snippet>

‎snippets/warn.sublime-snippet

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<snippet>
2+
<content><![CDATA[warn!("${1:\{${2::?}\}}"${1/([^\{])*(\{.*\})?.*/(?2:, :\);)/}$3${1/([^\{])*(\{.*\})?.*/(?2:\);)/}]]></content>
3+
<scope>source.rust</scope>
4+
<tabTrigger>warn</tabTrigger>
5+
<description>warn!(…)</description>
6+
</snippet>

0 commit comments

Comments
 (0)