From 389317368cce89f93a2f99186d7674f0258aeeda Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 28 Jul 2022 18:14:09 +0100 Subject: (Emacs)+makefile auto insert --- Emacs/.config/emacs/config.org | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'Emacs/.config/emacs/config.org') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 57545de..a160fa5 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -855,7 +855,31 @@ as well. " _ " -"))) +")) + (add-to-list + 'auto-insert-alist + '(("Makefile" . "Makefile skeleton") + "" + "CC=g++ +CFLAGS=-Wall -ggdb +FILES=main.cpp +OUT=main + +$(OUT): $(FILES) + $(CC) $(CFLAGS) $^ -o $@ + +.PHONY: +clean: + rm -rfv $(OUT) + +.PHONY: run +run: $(OUT) + ./$^ + +.PHONY: memcheck +memcheck: $(OUT) + valgrind --tool=memcheck ./$^" + _))) #+end_src *** Yasnippet default Setup global mode after evil mode has been loaded -- cgit v1.2.3-13-gbd6f