mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 10:24:18 +00:00
re-design snippets hierarchy
This commit is contained in:
3
snippets/cc-mode/c++-mode/beginend
Normal file
3
snippets/cc-mode/c++-mode/beginend
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : v.begin(), v.end()
|
||||
# --
|
||||
${1:v}.begin(), $1.end
|
||||
8
snippets/cc-mode/c++-mode/class
Normal file
8
snippets/cc-mode/c++-mode/class
Normal file
@@ -0,0 +1,8 @@
|
||||
#name : class ... { ... }
|
||||
# --
|
||||
class ${1:Name}
|
||||
{
|
||||
public:
|
||||
$1($2);
|
||||
virtual ~$1();
|
||||
};
|
||||
6
snippets/cc-mode/c++-mode/do
Normal file
6
snippets/cc-mode/c++-mode/do
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : do { ... } while (...)
|
||||
# --
|
||||
do
|
||||
{
|
||||
$0
|
||||
} while (${1:condition});
|
||||
6
snippets/cc-mode/c++-mode/for
Normal file
6
snippets/cc-mode/c++-mode/for
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : for (...; ...; ...) { ... }
|
||||
# --
|
||||
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
|
||||
{
|
||||
$0
|
||||
}
|
||||
6
snippets/cc-mode/c++-mode/if
Normal file
6
snippets/cc-mode/c++-mode/if
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : if (...) { ... }
|
||||
# --
|
||||
if (${1:condition})
|
||||
{
|
||||
$0
|
||||
}
|
||||
3
snippets/cc-mode/c++-mode/inc
Normal file
3
snippets/cc-mode/c++-mode/inc
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : #include "..."
|
||||
# --
|
||||
#include "$1"
|
||||
3
snippets/cc-mode/c++-mode/inc.1
Normal file
3
snippets/cc-mode/c++-mode/inc.1
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : #include <...>
|
||||
# --
|
||||
#include <$1>
|
||||
7
snippets/cc-mode/c++-mode/main
Normal file
7
snippets/cc-mode/c++-mode/main
Normal file
@@ -0,0 +1,7 @@
|
||||
#name: int main(argc, argv) { ... }
|
||||
# --
|
||||
int main(int argc, char const *argv)
|
||||
{
|
||||
$0
|
||||
return 0;
|
||||
}
|
||||
8
snippets/cc-mode/c++-mode/once
Normal file
8
snippets/cc-mode/c++-mode/once
Normal file
@@ -0,0 +1,8 @@
|
||||
#name : #ifndef XXX; #define XXX; #endif
|
||||
# --
|
||||
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
|
||||
#define $1
|
||||
|
||||
$0
|
||||
|
||||
#endif /* $1 */
|
||||
6
snippets/cc-mode/c++-mode/struct
Normal file
6
snippets/cc-mode/c++-mode/struct
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : struct ... { ... }
|
||||
# --
|
||||
struct ${1:name}
|
||||
{
|
||||
$0
|
||||
};
|
||||
4
snippets/cc-mode/c++-mode/using
Normal file
4
snippets/cc-mode/c++-mode/using
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : using namespace ...
|
||||
# --
|
||||
using namespace ${std};
|
||||
$0
|
||||
6
snippets/cc-mode/c-mode/do
Normal file
6
snippets/cc-mode/c-mode/do
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : do { ... } while (...)
|
||||
# --
|
||||
do
|
||||
{
|
||||
$0
|
||||
} while (${1:condition});
|
||||
6
snippets/cc-mode/c-mode/for
Normal file
6
snippets/cc-mode/c-mode/for
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : for (...; ...; ...) { ... }
|
||||
# --
|
||||
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
|
||||
{
|
||||
$0
|
||||
}
|
||||
6
snippets/cc-mode/c-mode/if
Normal file
6
snippets/cc-mode/c-mode/if
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : if (...) { ... }
|
||||
# --
|
||||
if (${1:condition})
|
||||
{
|
||||
$0
|
||||
}
|
||||
3
snippets/cc-mode/c-mode/inc
Normal file
3
snippets/cc-mode/c-mode/inc
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : #include "..."
|
||||
# --
|
||||
#include "$1"
|
||||
3
snippets/cc-mode/c-mode/inc.1
Normal file
3
snippets/cc-mode/c-mode/inc.1
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : #include <...>
|
||||
# --
|
||||
#include <$1>
|
||||
7
snippets/cc-mode/c-mode/main
Normal file
7
snippets/cc-mode/c-mode/main
Normal file
@@ -0,0 +1,7 @@
|
||||
#name: int main(argc, argv) { ... }
|
||||
# --
|
||||
int main(int argc, char *argv)
|
||||
{
|
||||
$0
|
||||
return 0;
|
||||
}
|
||||
8
snippets/cc-mode/c-mode/once
Normal file
8
snippets/cc-mode/c-mode/once
Normal file
@@ -0,0 +1,8 @@
|
||||
#name : #ifndef XXX; #define XXX; #endif
|
||||
# --
|
||||
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
|
||||
#define $1
|
||||
|
||||
$0
|
||||
|
||||
#endif /* $1 */
|
||||
6
snippets/cc-mode/c-mode/struct
Normal file
6
snippets/cc-mode/c-mode/struct
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : struct ... { ... }
|
||||
# --
|
||||
struct ${1:name}
|
||||
{
|
||||
$0
|
||||
};
|
||||
Reference in New Issue
Block a user