init
This commit is contained in:
9
snippets/cc-mode/case
Normal file
9
snippets/cc-mode/case
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: case : {...}
|
||||
# key: case
|
||||
# expand-env: ((yas-also-auto-indent-first-line t))
|
||||
# --
|
||||
case ${2:constexpr}:${3: \{}
|
||||
$0
|
||||
break;
|
||||
${3:$(if (string-match "\{" yas-text) "\}" "")}
|
||||
7
snippets/cc-mode/do
Normal file
7
snippets/cc-mode/do
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: do { ... } while (...)
|
||||
# key: do
|
||||
# --
|
||||
do {
|
||||
$0
|
||||
} while (${1:condition});
|
||||
7
snippets/cc-mode/else
Normal file
7
snippets/cc-mode/else
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: else { ... }
|
||||
# key: else
|
||||
# --
|
||||
else${1: {
|
||||
$0
|
||||
}}
|
||||
13
snippets/cc-mode/file_description
Normal file
13
snippets/cc-mode/file_description
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- mode: snippet -*-
|
||||
#cotributor: Henrique Jung <henriquenj@gmail.com>
|
||||
# name: File description
|
||||
# key: \file
|
||||
# group: doxygen
|
||||
# --
|
||||
/**
|
||||
* \file ${1:`(file-name-nondirectory(buffer-file-name))`}
|
||||
* \brief ${2:A Documented file.}
|
||||
${3:*
|
||||
* ${4:Detailed description}
|
||||
*
|
||||
}*/
|
||||
7
snippets/cc-mode/for
Normal file
7
snippets/cc-mode/for
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# --
|
||||
for (${1:i = 0}; ${2:i < N}; ${3:++i}) {
|
||||
$0
|
||||
}
|
||||
8
snippets/cc-mode/for_n
Normal file
8
snippets/cc-mode/for_n
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: York Zhao
|
||||
# name: for_n
|
||||
# key: forn
|
||||
# --
|
||||
for (${1:auto }${2:i} = ${3:0}; $2 < ${4:MAXIMUM}; ++$2) {
|
||||
$0
|
||||
}
|
||||
14
snippets/cc-mode/function_description
Normal file
14
snippets/cc-mode/function_description
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- mode: snippet -*-
|
||||
#cotributor: Henrique Jung <henriquenj@gmail.com>
|
||||
# name: Function description
|
||||
# key: \brief
|
||||
# group: doxygen
|
||||
# --
|
||||
/**
|
||||
* \brief ${1:function description}
|
||||
${2:*
|
||||
* ${3:Detailed description}
|
||||
*
|
||||
}* \param ${4:param}
|
||||
* \return ${5:return type}
|
||||
*/
|
||||
7
snippets/cc-mode/if
Normal file
7
snippets/cc-mode/if
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: if (...) { ... }
|
||||
# key: if
|
||||
# --
|
||||
if (${1:condition}) ${2:\{
|
||||
$0
|
||||
\}}
|
||||
7
snippets/cc-mode/member_description
Normal file
7
snippets/cc-mode/member_description
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
#cotributor: Henrique Jung <henriquenj@gmail.com>
|
||||
# name: Member description
|
||||
# key: !<
|
||||
# group: doxygen
|
||||
# --
|
||||
/*!< ${1:Detailed description after the member} */
|
||||
6
snippets/cc-mode/printf
Normal file
6
snippets/cc-mode/printf
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: printf
|
||||
# key: printf
|
||||
# --
|
||||
printf("${1:%s}\\n"${1:$(if (string-match "%" yas-text) ", " "\);")
|
||||
}$2${1:$(if (string-match "%" yas-text) "\);" "")}
|
||||
8
snippets/cc-mode/struct
Normal file
8
snippets/cc-mode/struct
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: struct ... { ... }
|
||||
# key: struct
|
||||
# --
|
||||
struct ${1:name}
|
||||
{
|
||||
$0
|
||||
};
|
||||
11
snippets/cc-mode/switch
Normal file
11
snippets/cc-mode/switch
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: switch (...) { case : ... default: ...}
|
||||
# key: switch
|
||||
# --
|
||||
switch (${1:expr}) {
|
||||
case ${2:constexpr}:${3: \{}
|
||||
$0
|
||||
break;
|
||||
${3:$(if (string-match "\{" yas-text) "\}\n" "")}default:
|
||||
break;
|
||||
}
|
||||
5
snippets/cc-mode/ternary
Normal file
5
snippets/cc-mode/ternary
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ternary
|
||||
# key: ?
|
||||
# --
|
||||
(${1:cond}) ? ${2:then} : ${3:else};
|
||||
7
snippets/cc-mode/while
Normal file
7
snippets/cc-mode/while
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: while
|
||||
# key: while
|
||||
# --
|
||||
while (${1:condition}) {
|
||||
$0
|
||||
}
|
||||
Reference in New Issue
Block a user