(Emacs)~c-auto-newline t->nil, ~autoinsert for c/c++
c-auto-newline was annoying, so turn it off. auto insert Date->Created and less newlines
This commit is contained in:
@@ -2342,7 +2342,7 @@ opposing style.
|
||||
("return" . "⟼"))
|
||||
:init
|
||||
(setq-default c-basic-offset 2)
|
||||
(setq-default c-auto-newline t)
|
||||
(setq-default c-auto-newline nil)
|
||||
(setq-default c-default-style '((other . "user")))
|
||||
|
||||
(with-eval-after-load "autoinsert"
|
||||
@@ -2350,22 +2350,20 @@ opposing style.
|
||||
'("\\.c\\'" . "C skeleton")
|
||||
'(""
|
||||
"/* " (file-name-nondirectory (buffer-file-name (current-buffer))) "\n"
|
||||
" * Date: " (format-time-string "%Y-%m-%d") "\n"
|
||||
" * Created: " (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"
|
||||
" * Created: " (format-time-string "%Y-%m-%d") "\n"
|
||||
" * Author: " user-full-name "\n"
|
||||
" */\n"
|
||||
"\n"
|
||||
"\n"
|
||||
_)))
|
||||
:config
|
||||
(c-add-style
|
||||
|
||||
Reference in New Issue
Block a user