added menu support

This commit is contained in:
Zhang Chiyuan
2008-03-06 09:15:58 +00:00
parent be0493a0cb
commit 47e01c676f
17 changed files with 157 additions and 10 deletions

View File

@@ -0,0 +1,3 @@
#name : v.begin(), v.end()
# --
${1:v}.begin(), $1.end

8
snippets/c++-mode/class Normal file
View File

@@ -0,0 +1,8 @@
#name : class <20><> { <20><> }
# --
class ${1:Name}
{
public:
$1($2);
virtual ~$1();
};

6
snippets/c++-mode/do Normal file
View File

@@ -0,0 +1,6 @@
#name : do { <20><> } while (<28><>)
# --
do
{
$0
} while (${1:condition});

6
snippets/c++-mode/for Normal file
View File

@@ -0,0 +1,6 @@
#name : for (<28><>; <20><>; <20><>) { <20><> }
# --
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
{
$0
}

6
snippets/c++-mode/if Normal file
View File

@@ -0,0 +1,6 @@
#name : if ( <20><> ) { <20><> }
# --
if (${1:condition})
{
$0
}

7
snippets/c++-mode/main Normal file
View File

@@ -0,0 +1,7 @@
#name: int main(argc, argv) { <20><> }
# --
int main(int argc, char const *argv)
{
$0
return 0;
}

8
snippets/c++-mode/once Normal file
View 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/c++-mode/struct Normal file
View File

@@ -0,0 +1,6 @@
#name : struct <20><> { <20><> }
# --
struct ${1:name}
{
$0
};