自分のemacs.dを公開リポジトリに置いて、emacsの設定の同期を簡単にする系のやつ
Revisão | 1b22704f7d0ce86ea488a2cc3a0363864b260cfa (tree) |
---|---|
Hora | 2016-03-09 00:18:59 |
Autor | ornse01 <ornse01@user...> |
Commiter | ornse01 |
add yasnippet package and my snippets for c-mode.
@@ -21,6 +21,7 @@ | ||
21 | 21 | (el-get-bundle yaml-mode) |
22 | 22 | (el-get-bundle js2-mode) |
23 | 23 | (el-get-bundle rust-mode) |
24 | +(el-get-bundle yasnippet) | |
24 | 25 | |
25 | 26 | ;; ext lisp dir |
26 | 27 | (let ((default-directory (expand-file-name "~/.emacs.d/lisp"))) |
@@ -95,3 +96,8 @@ | ||
95 | 96 | |
96 | 97 | ;; font |
97 | 98 | (set-face-attribute 'default nil :font "Terminus-12") |
99 | + | |
100 | +;; yasnippet | |
101 | +(setq yas-snippet-dirs | |
102 | + '("~/.emacs.d/mySnippets")) | |
103 | +(yas-global-mode 1) |
@@ -0,0 +1,8 @@ | ||
1 | +# -*- mode: snippet -*- | |
2 | +# name: include guard | |
3 | +# key: include_guard | |
4 | +# -- | |
5 | +#ifndef __`(upcase (replace-regexp-in-string "\\." "_" (file-name-nondirectory (buffer-file-name))))`__ | |
6 | +#define __`(upcase (replace-regexp-in-string "\\." "_" (file-name-nondirectory (buffer-file-name))))`__ | |
7 | + | |
8 | +#endif /* __`(upcase (replace-regexp-in-string "\\." "_" (file-name-nondirectory (buffer-file-name))))`__ */ |
@@ -0,0 +1,29 @@ | ||
1 | +# -*- mode: snippet -*- | |
2 | +# name: libpng licence | |
3 | +# key: libpng_licence_header | |
4 | +# -- | |
5 | +/* | |
6 | + * `(file-name-nondirectory (buffer-file-name))` | |
7 | + * | |
8 | + * Copyright (c) `(format-time-string "%Y" (current-time))` $0 | |
9 | + * | |
10 | + * This software is provided 'as-is', without any express or implied | |
11 | + * warranty. In no event will the authors be held liable for any damages | |
12 | + * arising from the use of this software. | |
13 | + * | |
14 | + * Permission is granted to anyone to use this software for any purpose, | |
15 | + * including commercial applications, and to alter it and redistribute it | |
16 | + * freely, subject to the following restrictions: | |
17 | + * | |
18 | + * 1. The origin of this software must not be misrepresented; you must not | |
19 | + * claim that you wrote the original software. If you use this software | |
20 | + * in a product, an acknowledgment in the product documentation would be | |
21 | + * appreciated but is not required. | |
22 | + * | |
23 | + * 2. Altered source versions must be plainly marked as such, and must not be | |
24 | + * misrepresented as being the original software. | |
25 | + * | |
26 | + * 3. This notice may not be removed or altered from any source | |
27 | + * distribution. | |
28 | + * | |
29 | + */ |