Initial commit.

This commit is contained in:
yan
2011-11-17 15:45:33 -06:00
commit 882015bc6d
1819 changed files with 111625 additions and 0 deletions

7
vim/snippets/c/cl.snippet Executable file
View File

@@ -0,0 +1,7 @@
class ${1:`Filename('$1_t', 'name')`} {
public:
$1 (${2:arguments});
virtual ~$1 ();
private:
${3:/* data */}
};

3
vim/snippets/c/def.snippet Executable file
View File

@@ -0,0 +1,3 @@
#ifndef $1
#define ${1:SYMBOL} ${2:value}
#endif${3}

3
vim/snippets/c/do.snippet Executable file
View File

@@ -0,0 +1,3 @@
do {
${2:/* code */}
} while (${1:/* condition */});

3
vim/snippets/c/el.snippet Executable file
View File

@@ -0,0 +1,3 @@
else {
${1}
}

3
vim/snippets/c/for.snippet Executable file
View File

@@ -0,0 +1,3 @@
for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
${4:/* code */}
}

3
vim/snippets/c/forr.snippet Executable file
View File

@@ -0,0 +1,3 @@
for (${1:i} = 0; ${2:$1 < 5}; $1${3:++}) {
${4:/* code */}
}

1
vim/snippets/c/fpf.snippet Executable file
View File

@@ -0,0 +1 @@
fprintf(${1:stderr}, "${2:%s}\n"${3});${4}

4
vim/snippets/c/fun.snippet Executable file
View File

@@ -0,0 +1,4 @@
${1:void} ${2:function_name} (${3})
{
${4:/* code */}
}

3
vim/snippets/c/if.snippet Executable file
View File

@@ -0,0 +1,3 @@
if (${1:/* condition */}) {
${2:/* code */}
}

1
vim/snippets/c/inc/inc.snippet Executable file
View File

@@ -0,0 +1 @@
#include "${1:`Filename("$1.h")`}"${2}

View File

@@ -0,0 +1 @@
#include <${1:stdio}.h>${2}

4
vim/snippets/c/main.snippet Executable file
View File

@@ -0,0 +1,4 @@
int main (int argc, char const* argv[]) {
${1:/* code */}
return 0;
}

1
vim/snippets/c/map.snippet Executable file
View File

@@ -0,0 +1 @@
std::map<${1:key}, ${2:value}> map${3};

3
vim/snippets/c/ns.snippet Executable file
View File

@@ -0,0 +1,3 @@
namespace ${1:`Filename('', 'my')`} {
${2}
} /* $1 */

6
vim/snippets/c/once.snippet Executable file
View File

@@ -0,0 +1,6 @@
#ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`}
#define $1
${2}
#endif /* end of include guard: $1 */

1
vim/snippets/c/pr.snippet Executable file
View File

@@ -0,0 +1 @@
printf("${1:%s}\n"${2});${3}

View File

@@ -0,0 +1,7 @@
std::vector<char> v;
if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
char buf[1024];
while (size_t len = fread(buf, 1, sizeof(buf), $2))
v.insert(v.end(), buf, buf + len);
fclose($2);
}${3}

3
vim/snippets/c/st.snippet Executable file
View File

@@ -0,0 +1,3 @@
struct ${1:`Filename('$1_t', 'name')`} {
${2:/* data */}
}${3: /* optional variable list */};${4}

1
vim/snippets/c/t.snippet Executable file
View File

@@ -0,0 +1 @@
${1:/* condition */} ? ${2:a} : ${3:b}'

1
vim/snippets/c/td.snippet Executable file
View File

@@ -0,0 +1 @@
typedef ${1:int} ${2:MyCustomType};

3
vim/snippets/c/tds.snippet Executable file
View File

@@ -0,0 +1,3 @@
typedef struct {
${2:/* data */}
} ${1:`Filename('$1_t', 'name')`};

1
vim/snippets/c/vector.snippet Executable file
View File

@@ -0,0 +1 @@
std::vector<${1:char}> v${2};

3
vim/snippets/c/wh.snippet Executable file
View File

@@ -0,0 +1,3 @@
while (${1:/* condition */}) {
${2:/* code */}
}