This commit is contained in:
2024-04-30 07:08:23 +02:00
commit a711247971
2043 changed files with 16874 additions and 0 deletions

9
snippets/cc-mode/case Normal file
View 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
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: do { ... } while (...)
# key: do
# --
do {
$0
} while (${1:condition});

7
snippets/cc-mode/else Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: else { ... }
# key: else
# --
else${1: {
$0
}}

View 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
View 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
View 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
}

View 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
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: if (...) { ... }
# key: if
# --
if (${1:condition}) ${2:\{
$0
\}}

View 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
View 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
View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: struct ... { ... }
# key: struct
# --
struct ${1:name}
{
$0
};

11
snippets/cc-mode/switch Normal file
View 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
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: ternary
# key: ?
# --
(${1:cond}) ? ${2:then} : ${3:else};

7
snippets/cc-mode/while Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: while
# key: while
# --
while (${1:condition}) {
$0
}