mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -4,6 +4,28 @@ extends c
|
||||
|
||||
# We want to overwrite everything in parent ft.
|
||||
priority -49
|
||||
###########################################################################
|
||||
# Global functions #
|
||||
###########################################################################
|
||||
|
||||
global !p
|
||||
|
||||
def write_docstring_args(arglist, snip):
|
||||
args = str(arglist).split(',')
|
||||
|
||||
if len(args) > 1:
|
||||
c = 0
|
||||
for arg in args:
|
||||
if c == 0:
|
||||
snip.rv += arg
|
||||
c = 1
|
||||
else:
|
||||
snip += '* : %s' % arg.strip()
|
||||
else:
|
||||
snip.rv = args[0]
|
||||
|
||||
|
||||
endglobal
|
||||
|
||||
###########################################################################
|
||||
# TextMate Snippets #
|
||||
@ -70,4 +92,19 @@ public:
|
||||
|
||||
#endif /* $2 */
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet fnc "Basic c++ doxygen function template" b
|
||||
/**
|
||||
* @brief: ${4:brief}
|
||||
*
|
||||
* @param: `!p write_docstring_args(t[3],snip)`
|
||||
*
|
||||
* @return: `!p snip.rv = t[1]`
|
||||
*/
|
||||
${1:ReturnType} ${2:FunctionName}(${3:param})
|
||||
{
|
||||
${0:FunctionBody}
|
||||
}
|
||||
endsnippet
|
||||
# vim:ft=snippets:
|
||||
|
Reference in New Issue
Block a user