@@ -130,6 +130,84 @@ snippet fun
130
130
{
131
131
${4}
132
132
}
133
+ # function definition with zero parameters
134
+ snippet fun0
135
+ ${1: void } ${2: function_name } ()
136
+ {
137
+ ${3}
138
+ }
139
+ # function definition with Doxygen documentation
140
+ snippet dfun0
141
+ /*! \b rief ${1: Brief function description here }
142
+ *
143
+ * ${2: Detailed description of the function }
144
+ *
145
+ * \r eturn ${3: Return parameter description }
146
+ */
147
+ ${4: void } ${5: function_name } ()
148
+ {
149
+ ${6}
150
+ }
151
+ # function definition with one parameter
152
+ snippet fun1
153
+ ${1: void } ${2: function_name } (${3: Type } ${4: Parameter } )
154
+ {
155
+ ${5}
156
+ }
157
+ # function definition with one parameter with Doxygen documentation
158
+ snippet dfun1
159
+ /*! \b rief ${1: Brief function description here }
160
+ *
161
+ * ${2: Detailed description of the function }
162
+ *
163
+ * \p aram $3 ${4: Parameter description }
164
+ * \r eturn ${5: Return parameter description }
165
+ */
166
+ ${6: void } ${7: function_name } (${8: Type } ${3: Parameter } )
167
+ {
168
+ ${9}
169
+ }
170
+ # function definition with two parameters
171
+ snippet fun2
172
+ ${1: void } ${2: function_name } (${3: Type } ${4: Parameter } , ${5: Type } ${6: Parameter } )
173
+ {
174
+ ${7}
175
+ }
176
+ # function definition with two parameters with Doxygen documentation
177
+ snippet dfun2
178
+ /*! \b rief ${1: Brief function description here }
179
+ *
180
+ * ${2: Detailed description of the function }
181
+ *
182
+ * \p aram $3 ${4: Parameter description }
183
+ * \p aram $5 ${6: Parameter description }
184
+ * \r eturn ${7: Return parameter description }
185
+ */
186
+ ${8: void } ${9: function_name } (${10: Type } ${3: Parameter } , ${11: Type } ${5: Parameter } )
187
+ {
188
+ ${12}
189
+ }
190
+ # function definition with two parameters
191
+ snippet fun3
192
+ ${1: void } ${2: function_name } (${3: Type } ${4: Parameter } , ${5: Type } ${6: Parameter } , ${7: Type } ${8: Parameter } )
193
+ {
194
+ ${9}
195
+ }
196
+ # function definition with two parameters with Doxygen documentation
197
+ snippet dfun3
198
+ /*! \b rief ${1: Brief function description here }
199
+ *
200
+ * ${2: Detailed description of the function }
201
+ *
202
+ * \p aram $3 ${4: Parameter description }
203
+ * \p aram $5 ${6: Parameter description }
204
+ * \p aram $7 ${8: Parameter description }
205
+ * \r eturn ${9: Return parameter description }
206
+ */
207
+ ${10: void } ${11: function_name } (${12: Type } ${3: Parameter } , ${13: Type } ${5: Parameter } , ${14: Type } ${7: Parameter } )
208
+ {
209
+ ${15}
210
+ }
133
211
# function declaration
134
212
snippet fund
135
213
${1: void } ${2: function_name } (${3} );
@@ -140,21 +218,39 @@ snippet td
140
218
typedef ${1: int } ${2: MyCustomType } ;
141
219
# struct
142
220
snippet st
221
+ /*! \s truct $1
222
+ * \b rief ${3: Brief struct description }
223
+ *
224
+ * ${4: Detailed description }
225
+ */
143
226
struct ${1: `vim_snippets#Filename('$1 _t', 'name')` } {
144
- ${2: /* data */}
145
- }${3 : /* optional variable list */ } ;
227
+ ${2: Data } /*!< ${4 : Description } */
228
+ }${5 : /* optional variable list */ } ;
146
229
# typedef struct
147
230
snippet tds
231
+ /*! \s truct $2
232
+ * \b rief ${5: Brief struct description }
233
+ *
234
+ * ${6: Detailed description }
235
+ */
148
236
typedef struct ${2: _$1 } {
149
- ${3: /* data */}
237
+ m_ ${3: Data } /*!< ${4 : Description } */
150
238
} ${1: `vim_snippets#Filename('$1 _t', 'name')` } ;
151
239
152
240
snippet enum
241
+ /*! \e num $1
242
+ *
243
+ * ${2: Detailed description }
244
+ */
153
245
enum ${1: name } { ${0} };
154
246
# typedef enum
155
247
snippet tde
248
+ /*! \e num $2
249
+ *
250
+ * ${4: Detailed description }
251
+ */
156
252
typedef enum {
157
- ${1: /* data */}
253
+ ${1: Data } /*!< ${3 : Description } */
158
254
} ${2: foo } ;
159
255
# #
160
256
# # Input/Output
@@ -228,6 +324,11 @@ snippet getopt
228
324
}
229
325
}
230
326
# #
327
+ # TODO section
328
+ snippet todo
329
+ /*! TODO: ${1: Todo description here }
330
+ * \t odo $1
331
+ */
231
332
# # Miscellaneous
232
333
# This is kind of convenient
233
334
snippet .
0 commit comments