mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -130,6 +130,84 @@ snippet fun
|
||||
{
|
||||
${4}
|
||||
}
|
||||
# function definition with zero parameters
|
||||
snippet fun0
|
||||
${1:void} ${2:function_name}()
|
||||
{
|
||||
${3}
|
||||
}
|
||||
# function definition with Doxygen documentation
|
||||
snippet dfun0
|
||||
/*! \brief ${1:Brief function description here}
|
||||
*
|
||||
* ${2:Detailed description of the function}
|
||||
*
|
||||
* \return ${3:Return parameter description}
|
||||
*/
|
||||
${4:void} ${5:function_name}()
|
||||
{
|
||||
${6}
|
||||
}
|
||||
# function definition with one parameter
|
||||
snippet fun1
|
||||
${1:void} ${2:function_name}(${3:Type} ${4:Parameter})
|
||||
{
|
||||
${5}
|
||||
}
|
||||
# function definition with one parameter with Doxygen documentation
|
||||
snippet dfun1
|
||||
/*! \brief ${1:Brief function description here}
|
||||
*
|
||||
* ${2:Detailed description of the function}
|
||||
*
|
||||
* \param $3 ${4:Parameter description}
|
||||
* \return ${5:Return parameter description}
|
||||
*/
|
||||
${6:void} ${7:function_name}(${8:Type} ${3:Parameter})
|
||||
{
|
||||
${9}
|
||||
}
|
||||
# function definition with two parameters
|
||||
snippet fun2
|
||||
${1:void} ${2:function_name}(${3:Type} ${4:Parameter}, ${5:Type} ${6:Parameter})
|
||||
{
|
||||
${7}
|
||||
}
|
||||
# function definition with two parameters with Doxygen documentation
|
||||
snippet dfun2
|
||||
/*! \brief ${1:Brief function description here}
|
||||
*
|
||||
* ${2:Detailed description of the function}
|
||||
*
|
||||
* \param $3 ${4:Parameter description}
|
||||
* \param $5 ${6:Parameter description}
|
||||
* \return ${7:Return parameter description}
|
||||
*/
|
||||
${8:void} ${9:function_name}(${10:Type} ${3:Parameter}, ${11:Type} ${5:Parameter})
|
||||
{
|
||||
${12}
|
||||
}
|
||||
# function definition with two parameters
|
||||
snippet fun3
|
||||
${1:void} ${2:function_name}(${3:Type} ${4:Parameter}, ${5:Type} ${6:Parameter}, ${7:Type} ${8:Parameter})
|
||||
{
|
||||
${9}
|
||||
}
|
||||
# function definition with two parameters with Doxygen documentation
|
||||
snippet dfun3
|
||||
/*! \brief ${1:Brief function description here}
|
||||
*
|
||||
* ${2:Detailed description of the function}
|
||||
*
|
||||
* \param $3 ${4:Parameter description}
|
||||
* \param $5 ${6:Parameter description}
|
||||
* \param $7 ${8:Parameter description}
|
||||
* \return ${9:Return parameter description}
|
||||
*/
|
||||
${10:void} ${11:function_name}(${12:Type} ${3:Parameter}, ${13:Type} ${5:Parameter}, ${14:Type} ${7:Parameter})
|
||||
{
|
||||
${15}
|
||||
}
|
||||
# function declaration
|
||||
snippet fund
|
||||
${1:void} ${2:function_name}(${3});
|
||||
@ -140,21 +218,39 @@ snippet td
|
||||
typedef ${1:int} ${2:MyCustomType};
|
||||
# struct
|
||||
snippet st
|
||||
/*! \struct $1
|
||||
* \brief ${3:Brief struct description}
|
||||
*
|
||||
* ${4:Detailed description}
|
||||
*/
|
||||
struct ${1:`vim_snippets#Filename('$1_t', 'name')`} {
|
||||
${2:/* data */}
|
||||
}${3: /* optional variable list */};
|
||||
${2:Data} /*!< ${4:Description} */
|
||||
}${5: /* optional variable list */};
|
||||
# typedef struct
|
||||
snippet tds
|
||||
/*! \struct $2
|
||||
* \brief ${5:Brief struct description}
|
||||
*
|
||||
* ${6:Detailed description}
|
||||
*/
|
||||
typedef struct ${2:_$1 }{
|
||||
${3:/* data */}
|
||||
m_${3:Data} /*!< ${4:Description} */
|
||||
} ${1:`vim_snippets#Filename('$1_t', 'name')`};
|
||||
|
||||
snippet enum
|
||||
/*! \enum $1
|
||||
*
|
||||
* ${2:Detailed description}
|
||||
*/
|
||||
enum ${1:name} { ${0} };
|
||||
# typedef enum
|
||||
snippet tde
|
||||
/*! \enum $2
|
||||
*
|
||||
* ${4:Detailed description}
|
||||
*/
|
||||
typedef enum {
|
||||
${1:/* data */}
|
||||
${1:Data} /*!< ${3:Description} */
|
||||
} ${2:foo};
|
||||
##
|
||||
## Input/Output
|
||||
@ -228,6 +324,11 @@ snippet getopt
|
||||
}
|
||||
}
|
||||
##
|
||||
# TODO section
|
||||
snippet todo
|
||||
/*! TODO: ${1:Todo description here}
|
||||
* \todo $1
|
||||
*/
|
||||
## Miscellaneous
|
||||
# This is kind of convenient
|
||||
snippet .
|
||||
|
Reference in New Issue
Block a user