Changed coding style to bsd, added indentation-guessing.
This commit is contained in:
parent
6330c5b7e2
commit
fcdccec888
30
init.el
30
init.el
|
@ -1,5 +1,5 @@
|
||||||
;;; init.el --- tastytea's Emacs init file.
|
;;; init.el --- tastytea's Emacs init file.
|
||||||
;;; Time-stamp: <2019-03-30 18:42:24 CET>
|
;;; Time-stamp: <2019-03-31 18:50:31 CEST>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; I am using this file with Emacs 26, but most of it will probably work with
|
;;; I am using this file with Emacs 26, but most of it will probably work with
|
||||||
|
@ -165,6 +165,11 @@
|
||||||
("M-<up>" . scroll-down-line)))
|
("M-<up>" . scroll-down-line)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Set coding style.
|
||||||
|
(setq c-default-style "bsd"
|
||||||
|
c-basic-offset 4)
|
||||||
|
;; (c-set-offset 'statement-cont 0)
|
||||||
|
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package rtags
|
(use-package rtags
|
||||||
:pin melpa-stable
|
:pin melpa-stable
|
||||||
|
@ -242,11 +247,14 @@
|
||||||
:config
|
:config
|
||||||
(company-flx-mode +1))
|
(company-flx-mode +1))
|
||||||
|
|
||||||
;; Indentation
|
;; Set default indentation.
|
||||||
(setq-default indent-tabs-mode nil
|
(setq-default indent-tabs-mode nil
|
||||||
tab-width 4)
|
tab-width 4)
|
||||||
(setq c-default-style "linux"
|
|
||||||
c-basic-offset 4)
|
;; Guess indentation.
|
||||||
|
(use-package dtrt-indent
|
||||||
|
:hook
|
||||||
|
(prog-mode . dtrt-indent-mode))
|
||||||
|
|
||||||
;; Automatic project management.
|
;; Automatic project management.
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
|
@ -277,9 +285,7 @@
|
||||||
(defun my/load-realgud ()
|
(defun my/load-realgud ()
|
||||||
(load-library "realgud"))
|
(load-library "realgud"))
|
||||||
:bind
|
:bind
|
||||||
(:map c++-mode-map
|
(:map c-mode-base-map
|
||||||
("C-c g" . my/load-realgud))
|
|
||||||
(:map c-mode-map
|
|
||||||
("C-c g" . my/load-realgud)))
|
("C-c g" . my/load-realgud)))
|
||||||
|
|
||||||
;; Highlight TODO, FIXME, NOTE and so on.
|
;; Highlight TODO, FIXME, NOTE and so on.
|
||||||
|
@ -453,7 +459,7 @@
|
||||||
(ido-enable-flex-matching t)
|
(ido-enable-flex-matching t)
|
||||||
(ido-ignore-extensions t) ; Ignore extension like ~ and .o.
|
(ido-ignore-extensions t) ; Ignore extension like ~ and .o.
|
||||||
(ido-use-virtual-buffers t) ; Use history of recently opened buffers.
|
(ido-use-virtual-buffers t) ; Use history of recently opened buffers.
|
||||||
(recentf-max-saved-items 20) ; Keep this number of buffers in history.
|
(recentf-max-saved-items 40) ; Keep this number of buffers in history.
|
||||||
:config
|
:config
|
||||||
(flx-ido-mode t))
|
(flx-ido-mode t))
|
||||||
|
|
||||||
|
@ -504,7 +510,7 @@
|
||||||
(tabbar-selected (nil
|
(tabbar-selected (nil
|
||||||
:background "gray11"
|
:background "gray11"
|
||||||
:foreground "light gray"
|
:foreground "light gray"
|
||||||
:family "Sans Serif"
|
:family "Sans Serif"
|
||||||
:bold t))
|
:bold t))
|
||||||
(tabbar-unselected (nil
|
(tabbar-unselected (nil
|
||||||
:background "gray18"
|
:background "gray18"
|
||||||
|
@ -590,8 +596,7 @@
|
||||||
:defer 5
|
:defer 5
|
||||||
:init
|
:init
|
||||||
(setq midnight-delay 30 ; 30 seconds after "midnight"
|
(setq midnight-delay 30 ; 30 seconds after "midnight"
|
||||||
midnight-period (* 1 60 60)) ; Clean every 1 hours.
|
midnight-period (* 2 60 60)) ; Clean every 2 hours.
|
||||||
;; FIXME: midnight-period has no or not the desired effect.
|
|
||||||
:custom
|
:custom
|
||||||
(clean-buffer-list-delay-general 1) ; Clean normal bufs after 1d.
|
(clean-buffer-list-delay-general 1) ; Clean normal bufs after 1d.
|
||||||
(clean-buffer-list-delay-special (* 30 60)) ; Clean special bufs after 30m.
|
(clean-buffer-list-delay-special (* 30 60)) ; Clean special bufs after 30m.
|
||||||
|
@ -599,7 +604,8 @@
|
||||||
(setq clean-buffer-list-kill-regexps ; Add these to special buffers.
|
(setq clean-buffer-list-kill-regexps ; Add these to special buffers.
|
||||||
(nconc clean-buffer-list-kill-regexps
|
(nconc clean-buffer-list-kill-regexps
|
||||||
'("\\`magit-?.*:"
|
'("\\`magit-?.*:"
|
||||||
"\\.log\\'")))
|
"\\.log\\'"
|
||||||
|
"\\`'\\*rdm\\*\\'")))
|
||||||
(midnight-mode t))
|
(midnight-mode t))
|
||||||
|
|
||||||
;; The string Time-stamp: <> in the first 8 lines of the file will be updated
|
;; The string Time-stamp: <> in the first 8 lines of the file will be updated
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
127.0.0.1:51313 2297
|
127.0.0.1:51313 11422
|
||||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user