From 4789dd699445bf6fb860dfe7af594504e1c6452c Mon Sep 17 00:00:00 2001 From: mark <liumiaogemini@gmail.com> Date: Sun, 27 May 2018 11:43:46 +0800 Subject: [PATCH] too long to remember the message --- init.el | 7 +++++-- lisp/c-cpp-dev.el | 8 +++++--- lisp/user-fun.el | 2 +- snippets/c++-mode/fun_declaration | 2 +- snippets/c-mode/decline_new_fun | 5 +++++ snippets/c-mode/stdlib | 4 ++-- snippets/{c-mode => cc-mode}/define_fun | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 snippets/c-mode/decline_new_fun rename snippets/{c-mode => cc-mode}/define_fun (87%) diff --git a/init.el b/init.el index ced3536..d94441c 100644 --- a/init.el +++ b/init.el @@ -7,7 +7,7 @@ ;; This file is ;;; Code: -(setq debug-on-error t) +;; (setq debug-on-error t) (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) @@ -99,13 +99,16 @@ (require-package 'org2ctex) (require-package 'org-autolist) (require-package 'org-plus-contrib) + + (require 'org2ctex) + (org2ctex-toggle t) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (add-hook 'org-mode-hook 'turn-on-font-lock) (add-hook 'message-mode-hook 'turn-on-orgstruct) (add-hook 'message-mode-hook 'turn-on-orgstruct++) (add-hook 'org-mode-hook (lambda () (org-autolist-mode)));;enable org autolist - (add-hook 'org-mode-hook (lambda () (setq truncate-lines nil))) +;; (add-hook 'org-mode-hook (lambda () (setq truncate-lines nil))) (add-hook 'org-mode-hook 'iimage-mode) (add-hook 'org-mode-hook 'visual-line-mode) ) diff --git a/lisp/c-cpp-dev.el b/lisp/c-cpp-dev.el index ab732c0..91fa71f 100644 --- a/lisp/c-cpp-dev.el +++ b/lisp/c-cpp-dev.el @@ -34,9 +34,11 @@ (when *is-a-win* (setq usr-include-path '( - "c:/msys64/mingw64/x86_64-w64-mingw32/include" - "c:/msys64/mingw64/x86_64-w64-mingw32/include/c++" - ))) + "C:\\Program Files\\mingw-w64\\mingw64\\x86_64-w64-mingw32\\include" + "C:\\Program Files\\mingw-w64\\mingw64\\include" + "C:\\Program Files\\mingw-w64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\7.3.0\\include" + "C:\\Program Files\\mingw-w64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\7.3.0\\include\\c++" + ))) (defun c-cpp/cc-mode () diff --git a/lisp/user-fun.el b/lisp/user-fun.el index c4c1e34..006f1d7 100644 --- a/lisp/user-fun.el +++ b/lisp/user-fun.el @@ -8,7 +8,7 @@ ;;; Get init.el ;;--------------------------------------------------------------------------- -(defun mark/open-init-file() +(defun open-init-file() "Find and open the init.el." (interactive) (find-file "~/.emacs.d/init.el")) diff --git a/snippets/c++-mode/fun_declaration b/snippets/c++-mode/fun_declaration index 03184dc..517b354 100644 --- a/snippets/c++-mode/fun_declaration +++ b/snippets/c++-mode/fun_declaration @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: fun_declaration -# key: f +# key: dcf/ # -- ${1:type} ${2:name}(${3:args})${4: const}; \ No newline at end of file diff --git a/snippets/c-mode/decline_new_fun b/snippets/c-mode/decline_new_fun new file mode 100644 index 0000000..1e9e3d3 --- /dev/null +++ b/snippets/c-mode/decline_new_fun @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: decline new function +# key: dcf/ +# -- +${type} ${name}(${}); diff --git a/snippets/c-mode/stdlib b/snippets/c-mode/stdlib index a7d117b..a65f1c1 100644 --- a/snippets/c-mode/stdlib +++ b/snippets/c-mode/stdlib @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: stdlib -# key: std +# key: lib # -- -#include <stdlib.h> +#include <stdlib.h> \ No newline at end of file diff --git a/snippets/c-mode/define_fun b/snippets/cc-mode/define_fun similarity index 87% rename from snippets/c-mode/define_fun rename to snippets/cc-mode/define_fun index a4db3ff..a53862c 100644 --- a/snippets/c-mode/define_fun +++ b/snippets/cc-mode/define_fun @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: define_fun -# key: df +# key: df/ # -- ${type} ${name}(${}) { -- GitLab