Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include the C TextMate bundle and C++ Sublime Text package for the ex…
…ample
- Loading branch information
Showing
86 changed files
with
5,475 additions
and
6 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
examples/subl2tm/Sublime Text/#ifndef-#define-#endif.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<description>#ifndef … #define … #endif</description> | ||
<content><![CDATA[#ifndef ${1/([A-Za-z0-9_]+).*/$1/} | ||
#define ${1:SYMBOL} ${2:value} | ||
#endif]]></content> | ||
<tabTrigger>def</tabTrigger> | ||
<scope>source.c, source.c++, source.objc, source.objc++</scope> | ||
</snippet> |
6 changes: 6 additions & 0 deletions
6
examples/subl2tm/Sublime Text/#include-(inc angle).sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<description>#include <…></description> | ||
<content><![CDATA[#include <${1:.h}>]]></content> | ||
<tabTrigger>Inc</tabTrigger> | ||
<scope>source.c, source.objc, source.c++, source.objc++</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<description>#include "…"</description> | ||
<content><![CDATA[#include "${1:${TM_FILENAME/\..+$/.h/}}"]]></content> | ||
<tabTrigger>inc</tabTrigger> | ||
<scope>source.c, source.objc, source.c++, source.objc++</scope> | ||
</snippet> |
6 changes: 6 additions & 0 deletions
6
examples/subl2tm/Sublime Text/$1.begin()-$1.end()-(beginend).sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<description>$1.begin(), $1.end()</description> | ||
<content><![CDATA[${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}begin(), ${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end()]]></content> | ||
<tabTrigger>beginend</tabTrigger> | ||
<scope>source.c++, source.objc++</scope> | ||
</snippet> |
10 changes: 10 additions & 0 deletions
10
examples/subl2tm/Sublime Text/010-main()-(main).sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<snippet> | ||
<description>main()</description> | ||
<content><![CDATA[int main(int argc, char const${TM_C_POINTER: *}argv[]) | ||
{ | ||
${0:/* code */} | ||
return 0; | ||
}]]></content> | ||
<tabTrigger>main</tabTrigger> | ||
<scope>source.c, source.objc, source.c++, source.objc++</scope> | ||
</snippet> |
9 changes: 9 additions & 0 deletions
9
examples/subl2tm/Sublime Text/030-for-int-loop-(fori).sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<snippet> | ||
<description>For Loop</description> | ||
<content><![CDATA[for (int ${2:i} = 0; $2 < ${1:count}; ${3:++$2}) | ||
{ | ||
${0:/* code */} | ||
}]]></content> | ||
<tabTrigger>for</tabTrigger> | ||
<scope>source.c, source.objc, source.c++, source.objc++</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"], | ||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | ||
"working_dir": "${file_path}", | ||
"selector": "source.c, source.c++", | ||
|
||
"variants": | ||
[ | ||
{ | ||
"name": "Run", | ||
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extensions": ["cpp", "cc", "cxx", "c++", "h", "hpp", "hxx", "h++", "inl", "ipp"] | ||
} |
Oops, something went wrong.