Clean up init file and create default settings

This commit is contained in:
Marcus Kammer 2020-11-18 15:27:56 +01:00
parent 957afdffda
commit 2cb6ea8461
5 changed files with 61 additions and 48 deletions

View file

@ -0,0 +1,30 @@
(horizontal-scroll-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode 0)
(tool-bar-mode 0)
(show-paren-mode 1)
(global-hl-line-mode 1)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(setq-default indent-tabs-mode nil
inhibit-startup-buffer-menu t
inhibit-startup-screen t
ispell-program-name "aspell"
line-spacing nil
calendar-christian-all-holidays-flag t
calendar-date-style (quote iso)
calendar-view-diary-initially-flag t
calendar-week-start-day 1
make-backup-files nil
browse-url-browser-function (quote eww-browse-url)
indent-tabs-mode nil
inhibit-startup-buffer-menu t
inhibit-startup-screen t)
(setq tab-width 4
sentence-end-double-space nil
next-line-add-newlines t
require-final-newline 't)

18
bundle/bundle--hooks.el Normal file
View file

@ -0,0 +1,18 @@
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)
(defun me/org-mode ()
"My custom configuration for 'org-mode'."
;(olivetti-mode)
(require 'olivetti)
(olivetti-set-width 82))
(add-hook 'nov-mode-hook 'me/org-mode)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(if (display-graphic-p)
(add-hook 'after-init-hook (lambda ()
(org-agenda-list)
(me/split-windows-horizontal))))

7
bundle/bundle--lists.el Normal file
View file

@ -0,0 +1,7 @@
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.lisp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.lsp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.cl$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(add-to-list 'slime-contribs 'slime-autodoc)

View file

@ -7,11 +7,6 @@
'(ansi-color-faces-vector '(ansi-color-faces-vector
[default default default italic underline success warning error]) [default default default italic underline success warning error])
'(backup-directory-alist (quote (("." . "~/.backup_filez")))) '(backup-directory-alist (quote (("." . "~/.backup_filez"))))
'(browse-url-browser-function (quote eww-browse-url))
'(calendar-christian-all-holidays-flag t)
'(calendar-date-style (quote iso))
'(calendar-view-diary-initially-flag t)
'(calendar-week-start-day 1)
'(custom-enabled-themes (quote (nord))) '(custom-enabled-themes (quote (nord)))
'(custom-safe-themes '(custom-safe-themes
(quote (quote
@ -33,19 +28,11 @@
(elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-pyvenv elpy-module-yasnippet elpy-module-sane-defaults))) (elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-pyvenv elpy-module-yasnippet elpy-module-sane-defaults)))
'(elpy-test-runner (quote elpy-test-pytest-runner)) '(elpy-test-runner (quote elpy-test-pytest-runner))
'(geiser-default-implementation (quote racket)) '(geiser-default-implementation (quote racket))
'(global-hl-line-mode t)
'(horizontal-scroll-bar-mode nil)
'(indent-tabs-mode nil)
'(inhibit-startup-buffer-menu t)
'(inhibit-startup-screen t)
'(initial-buffer-choice '(initial-buffer-choice
"d:/UserData/marcus.kammer/OneDrive - Siemens AG/documents/Journal/notes.org") "d:/UserData/marcus.kammer/OneDrive - Siemens AG/documents/Journal/notes.org")
'(initial-frame-alist nil) '(initial-frame-alist nil)
'(ispell-program-name "aspell")
'(line-spacing nil)
'(ls-lisp-dirs-first t) '(ls-lisp-dirs-first t)
'(make-backup-files nil) '(make-backup-files nil)
'(menu-bar-mode nil)
'(mode-line-format '(mode-line-format
(quote (quote
("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " mode-line-position mode-line-modes ("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " mode-line-position mode-line-modes
@ -100,9 +87,7 @@
'(projectile-completion-system (quote ivy)) '(projectile-completion-system (quote ivy))
'(python-indent-guess-indent-offset nil) '(python-indent-guess-indent-offset nil)
'(python-shell-interpreter "python") '(python-shell-interpreter "python")
'(ring-bell-function (quote ignore)) '(ring-bell-function (quote ignore)))
'(scroll-bar-mode nil)
'(tool-bar-mode nil))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

37
init.el
View file

@ -1,4 +1,7 @@
(require 'cl)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/"))
(load "bundle--defaults")
(load "bundle--server") (load "bundle--server")
(load "bundle--package") (load "bundle--package")
(load "bundle--customfile") (load "bundle--customfile")
@ -7,39 +10,9 @@
(load "bundle--holidays") (load "bundle--holidays")
(load "bundle--latex") (load "bundle--latex")
(load "bundle--mk") (load "bundle--mk")
(load "bundle--hooks")
(load "bundle--lists")
;; (load-theme 'nord t) ;; (load-theme 'nord t)
(require 'color-theme-sanityinc-tomorrow) (require 'color-theme-sanityinc-tomorrow)
(defalias 'yes-or-no-p 'y-or-n-p) (defalias 'yes-or-no-p 'y-or-n-p)
(org-clock-persistence-insinuate) (org-clock-persistence-insinuate)
;; HOOKS
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)
(defun me/org-mode ()
"My custom configuration for 'org-mode'."
;(olivetti-mode)
(require 'olivetti)
(olivetti-set-width 82))
(add-hook 'nov-mode-hook 'me/org-mode)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(if (display-graphic-p)
(add-hook 'after-init-hook (lambda ()
(org-agenda-list)
(me/split-windows-horizontal))))
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.lisp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.lsp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.cl$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(add-to-list 'slime-contribs 'slime-autodoc)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)