1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2013-07-17 19:06:05 -04:00
parent 879a7b6bd4
commit a448b32309
85 changed files with 2174 additions and 941 deletions

View File

@ -14,13 +14,13 @@ snippet mainn
return 0;
}
##
## Preprocessor
## Preprocessor
# #include <...>
snippet inc
#include <${1:stdio}.h>${2}
# #include "..."
snippet Inc
#include "${1:`Filename("$1.h")`}"${2}
#include "${1:`vim_snippets#Filename("$1.h")`}"${2}
# ifndef...define...endif
snippet ndef
#ifndef $1
@ -41,7 +41,7 @@ snippet #if
#endif
# header include guard
snippet once
#ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`}
#ifndef ${1:`toupper(vim_snippets#Filename('$1_H', 'UNTITLED_H'))`}
#define $1
@ -53,7 +53,7 @@ snippet once
# if
snippet if
if (${1:/* condition */}) {
${2:/* code */}
${2}
}${3}
# else
snippet el
@ -63,8 +63,11 @@ snippet el
# else if
snippet elif
else if (${1:/* condition */}) {
${2:/* code */}
${2}
}${3}
# ifi
snippet ifi
if (${1:/* condition */}) ${2};${3}
# ternary
snippet t
${1:/* condition */} ? ${2:a} : ${3:b}
@ -94,22 +97,22 @@ snippet case
# for
snippet for
for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
${4:/* code */}
${4}
}${5}
# for (custom)
snippet forr
for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
${5:/* code */}
${5}
}${6}
# while
snippet wh
while (${1:/* condition */}) {
${2:/* code */}
${2}
}${3}
# do... while
snippet do
do {
${2:/* code */}
${2}
} while (${1:/* condition */});${3}
##
## Functions
@ -117,7 +120,7 @@ snippet do
snippet fun
${1:void} ${2:function_name}(${3})
{
${4:/* code */}
${4}
}${5}
# function declaration
snippet fund
@ -129,14 +132,14 @@ snippet td
typedef ${1:int} ${2:MyCustomType};${3}
# struct
snippet st
struct ${1:`Filename('$1_t', 'name')`} {
struct ${1:`vim_snippets#Filename('$1_t', 'name')`} {
${2:/* data */}
}${3: /* optional variable list */};${4}
# typedef struct
snippet tds
typedef struct ${2:_$1 }{
${3:/* data */}
} ${1:`Filename('$1_t', 'name')`};${4}
} ${1:`vim_snippets#Filename('$1_t', 'name')`};${4}
# typedef enum
snippet tde
typedef enum {
@ -230,5 +233,5 @@ snippet gpl
*
* Copyright (C) ${1:Author}, `strftime("%Y")`
*/
${2}