Install yasnippet and vala-snippets packages

This commit is contained in:
Gergely Polonkai
2016-10-20 10:20:38 +02:00
parent d1468f35a7
commit a498706564
1085 changed files with 12052 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name : case : {...}
# key: case
# --
`(indent-region (- (point) 20) (+ (point) 20) nil)`case ${2:constexpr}:${3: \{}
$0
break;
${3:$(if (string-match "\{" yas-text) "\}" "")}

View File

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

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}
*
}*/

View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: FILE *fp = fopen(..., ...);
# key: fopen
# --
FILE *${fp} = fopen(${"file"}, "${r}");

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: for
# key: for
# --
for (${1:i = 0}; ${2:i < N}; ${3:i++}) {
$0
}

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}
*/

View File

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

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: ifdef
# key: ifdef
# --
#ifdef ${1:MACRO}
$0
#endif // $1

View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name : #include <...>
# key : inc
# --
#include <$1>

View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name : #include "..."
# key : inc
# --
#include "$1"

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
int main(${1:int argc, char *argv[]})
{
$0
return 0;
}

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: math
# key: math
# --
#include <math.h>
$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} */

View File

@@ -0,0 +1,9 @@
#name : #ifndef XXX; #define XXX; #endif
# key: once
# --
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
#define $1
$0
#endif /* $1 */

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) "\);" "")}

View File

@@ -0,0 +1,7 @@
#name : struct ... { ... }
# key: struct
# --
struct ${1:name}
{
$0
};

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

View File

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

View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: typedef
# key: typedef
# --
typedef ${1:type} ${2:alias};

View File

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