- starting init.el just basics (package, use-package, path-handlin) - include my-site-start.el that includes site-start.d directory and imports all *.el files in lexical order - functionality is imported via use-package inside the *.el file (first run: internet connection is needed to MELPA)
77 lines
1.7 KiB
EmacsLisp
77 lines
1.7 KiB
EmacsLisp
;;; 00-my-setup.el --- basic personal definitions
|
|
|
|
;;; Commentary:
|
|
;; to debug the startup, run Emacs with folloging flag
|
|
;; emacs --debug-init
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
;; regular used custom function
|
|
(defun reload-init-file ()
|
|
"Reload my init file."
|
|
(interactive)
|
|
(load-file user-init-file))
|
|
|
|
(bind-key "C-c M-l" 'reload-init-file)
|
|
|
|
;; surpress bloat messages
|
|
(setq inhibit-startup-message t
|
|
initial-scratch-message ""
|
|
inhibit-startup-echo-area-message t
|
|
inhibit-splash-screen t)
|
|
|
|
;; line wrapping
|
|
(setq new-line-add-newlines nil)
|
|
(setq-default truncate-lines t)
|
|
(setq truncate-partial-width-windows nil)
|
|
|
|
;; symbol and cursor handling
|
|
(global-prettify-symbols-mode +1)
|
|
(setq x-stretch-cursor t)
|
|
|
|
;; to window panes organized horizontally
|
|
;; (split-window-horizontally)
|
|
|
|
;; python mode adaptions
|
|
(add-hook 'python-mode-hook
|
|
(lambda ()
|
|
(setq indent-tabs-mode t)
|
|
(setq python-indent 8)
|
|
(setq tab-width 4)))
|
|
|
|
;; enable 'linux' as default c-mode minor mode
|
|
(add-hook 'c-mode-common-hook
|
|
'linux)
|
|
|
|
;; auto enable modes
|
|
(semantic-mode 1)
|
|
|
|
;; auto enable recent files
|
|
(recentf-mode 1)
|
|
|
|
;; where are my encrypted auth keys
|
|
(setq auth-sources
|
|
'((:source "~/.emacs.d/secrets/.authinfo.gpg")))
|
|
|
|
;; automactic handling of whitespace cleanup
|
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|
|
|
|
;; font settings
|
|
(set-default-font "Source Code Pro" nil t)
|
|
(set-face-attribute 'default nil :height 110)
|
|
|
|
;; prettify symbols
|
|
(global-prettify-symbols-mode +1)
|
|
|
|
;; save Emacs backup files in one central directory, not cluttering the filesystem
|
|
(setq backup-directory-alist
|
|
`(("." . ,(expand-file-name
|
|
(concat user-emacs-directory "backups")))))
|
|
|
|
;; shorten yes or no dialog
|
|
(fset 'yes-or-no-p 'y-or-n-p)
|
|
|
|
(provide '00-my-setup)
|
|
;;; 00-my-setup.el ends here
|