Changed coding style to bsd, added indentation-guessing.

This commit is contained in:
tastytea 2019-03-31 18:52:08 +02:00
parent 6330c5b7e2
commit fcdccec888
2 changed files with 19 additions and 13 deletions

30
init.el
View File

@ -1,5 +1,5 @@
;;; 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:
;;; 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)))
;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Set coding style.
(setq c-default-style "bsd"
c-basic-offset 4)
;; (c-set-offset 'statement-cont 0)
(unless slow-computer
(use-package rtags
:pin melpa-stable
@ -242,11 +247,14 @@
:config
(company-flx-mode +1))
;; Indentation
;; Set default indentation.
(setq-default indent-tabs-mode nil
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.
(unless slow-computer
@ -277,9 +285,7 @@
(defun my/load-realgud ()
(load-library "realgud"))
:bind
(:map c++-mode-map
("C-c g" . my/load-realgud))
(:map c-mode-map
(:map c-mode-base-map
("C-c g" . my/load-realgud)))
;; Highlight TODO, FIXME, NOTE and so on.
@ -453,7 +459,7 @@
(ido-enable-flex-matching t)
(ido-ignore-extensions t) ; Ignore extension like ~ and .o.
(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
(flx-ido-mode t))
@ -504,7 +510,7 @@
(tabbar-selected (nil
:background "gray11"
:foreground "light gray"
:family "Sans Serif"
:family "Sans Serif"
:bold t))
(tabbar-unselected (nil
:background "gray18"
@ -590,8 +596,7 @@
:defer 5
:init
(setq midnight-delay 30 ; 30 seconds after "midnight"
midnight-period (* 1 60 60)) ; Clean every 1 hours.
;; FIXME: midnight-period has no or not the desired effect.
midnight-period (* 2 60 60)) ; Clean every 2 hours.
:custom
(clean-buffer-list-delay-general 1) ; Clean normal bufs after 1d.
(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.
(nconc clean-buffer-list-kill-regexps
'("\\`magit-?.*:"
"\\.log\\'")))
"\\.log\\'"
"\\`'\\*rdm\\*\\'")))
(midnight-mode t))
;; The string Time-stamp: <> in the first 8 lines of the file will be updated

View File

@ -1,2 +1,2 @@
127.0.0.1:51313 2297
127.0.0.1:51313 11422
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh