diff options
Diffstat (limited to 'emacs.d/lisp/yasnippet/snippets/cc-mode')
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/.yas-parents | 1 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/do | 6 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/for | 6 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/if | 6 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/inc | 3 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/inc.1 | 3 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/main | 7 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/once | 8 | ||||
-rw-r--r-- | emacs.d/lisp/yasnippet/snippets/cc-mode/struct | 6 |
9 files changed, 46 insertions, 0 deletions
diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/.yas-parents b/emacs.d/lisp/yasnippet/snippets/cc-mode/.yas-parents new file mode 100644 index 0000000..eed5b44 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/do b/emacs.d/lisp/yasnippet/snippets/cc-mode/do new file mode 100644 index 0000000..5f7a313 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/do @@ -0,0 +1,6 @@ +#name : do { ... } while (...) +# -- +do +{ + $0 +} while (${1:condition});
\ No newline at end of file diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/for b/emacs.d/lisp/yasnippet/snippets/cc-mode/for new file mode 100644 index 0000000..c4cade6 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/for @@ -0,0 +1,6 @@ +#name : for (...; ...; ...) { ... } +# -- +for (${1:int i = 0}; ${2:i < N}; ${3:++i}) +{ + $0 +}
\ No newline at end of file diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/if b/emacs.d/lisp/yasnippet/snippets/cc-mode/if new file mode 100644 index 0000000..c3fe10d --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/if @@ -0,0 +1,6 @@ +#name : if (...) { ... } +# -- +if (${1:condition}) +{ + $0 +}
\ No newline at end of file diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/inc b/emacs.d/lisp/yasnippet/snippets/cc-mode/inc new file mode 100644 index 0000000..ae33328 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/inc @@ -0,0 +1,3 @@ +#name : #include "..." +# -- +#include "$1" diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/inc.1 b/emacs.d/lisp/yasnippet/snippets/cc-mode/inc.1 new file mode 100644 index 0000000..66326cd --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/inc.1 @@ -0,0 +1,3 @@ +#name : #include <...> +# -- +#include <$1> diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/main b/emacs.d/lisp/yasnippet/snippets/cc-mode/main new file mode 100644 index 0000000..9249049 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/main @@ -0,0 +1,7 @@ +#name: int main(argc, argv) { ... } +# -- +int main(int argc, char *argv[]) +{ + $0 + return 0; +} diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/once b/emacs.d/lisp/yasnippet/snippets/cc-mode/once new file mode 100644 index 0000000..1b63c39 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/once @@ -0,0 +1,8 @@ +#name : #ifndef XXX; #define XXX; #endif +# -- +#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_} +#define $1 + +$0 + +#endif /* $1 */
\ No newline at end of file diff --git a/emacs.d/lisp/yasnippet/snippets/cc-mode/struct b/emacs.d/lisp/yasnippet/snippets/cc-mode/struct new file mode 100644 index 0000000..f50dabf --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/cc-mode/struct @@ -0,0 +1,6 @@ +#name : struct ... { ... } +# -- +struct ${1:name} +{ + $0 +};
\ No newline at end of file |