aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r--Emacs/.config/emacs/config.org40
1 files changed, 40 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index c8cfd06..5fc38d2 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -1980,7 +1980,47 @@ opposing style.
("||" . "∨")
("for" . "∀")
("return" . "⟼")))
+ (with-eval-after-load "autoinsert"
+ (define-auto-insert
+ '("\\.c\\'" . "C skeleton")
+ '(""
+ "/* " (file-name-nondirectory (buffer-file-name (current-buffer))) "\n"
+ " * Date: " (format-time-string "%Y-%m-%d") "\n"
+ " * Author: " user-full-name "\n"
+ " */\n"
+ "\n"
+ "\n"
+ _))
+
+ (define-auto-insert
+ '("\\.cpp\\'" . "C++ skeleton")
+ '(""
+ "/* " (file-name-nondirectory (buffer-file-name (current-buffer))) "\n"
+ " * Date: " (format-time-string "%Y-%m-%d") "\n"
+ " * Author: " user-full-name "\n"
+ " */\n"
+ "\n"
+ "\n"
+ _)))
:config
+ (with-eval-after-load "abbrev"
+ (+autotyping/gen-skeleton-abbrev
+ c-mode
+ "sgen"
+ "Name of item: "
+ str | "name" "\n"
+ "{\n"
+ > _ "\n"
+ "}\n")
+
+ (+autotyping/gen-skeleton-abbrev
+ c++-mode
+ "sgen"
+ "Name of item: "
+ > str | "name" "\n"
+ "{\n"
+ > _ "\n"
+ "}\n"))
(c-add-style
"user"
'((c-basic-offset . 2)