emacs.d/init.el

191 lines
5.8 KiB
EmacsLisp
Raw Normal View History

2020-07-26 14:36:43 +02:00
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/"))
2023-10-02 16:05:31 +02:00
;;; bundle--defaults
2023-10-02 16:04:07 +02:00
;; General user interface and appearance
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(horizontal-scroll-bar-mode -1)
(global-hl-line-mode 1)
(display-time-mode 1)
(global-prettify-symbols-mode -1)
(set-fringe-mode 10)
(setq display-time-format " W%V %a %d %b %Y %R %z")
(setq display-time-24hr-format t)
;; Cursor and mouse
(column-number-mode 1)
(mouse-wheel-mode 1)
(blink-cursor-mode -1)
;; Customization for locale, environment and computer
(setq calendar-latitude 49.4
calendar-longitude 11.0
;; calendar-location-name "Nuremberg, DE"
european-calendar-style t
calendar-christian-all-holidays-flag t
calendar-date-style (quote iso)
calendar-view-diary-initially-flag t
calendar-week-start-day 1
calendar-intermonth-text
'(propertize
(format "%2d"
(car
(calendar-iso-from-absolute
(calendar-absolute-from-gregorian
(list month day year )))))
'font-lock-face 'font-lock-function-name-face))
(setq calendar-location-name "Nuremberg, DE")
(setq ispell-program-name "hunspell")
(setq grep-command "grep -i -nH -e ")
(when (eq system-type 'gnu/linux)
(setq shell-file-name "/bin/bash")
(setq tex-shell-file-name "/bin/bash"))
;; Files and sessions
(setq auto-save-timeout 60)
;; Tabs, spaces, lines and parenthesis
(show-paren-mode 1)
(setq indent-tabs-mode nil)
(setq line-spacing nil)
(setq make-backup-files nil)
(setq tab-width 4)
(setq sentence-end-double-space nil)
(setq next-line-add-newlines t)
(setq require-final-newline t)
;; Miscellaneous
(require 'cl-lib)
(setq default-major-mode 'text-mode)
(setq inhibit-startup-buffer-menu t inhibit-startup-screen t)
(setq tramp-default-method "ssh")
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(defalias 'yes-or-no-p 'y-or-n-p)
;; ;; Mode line
;; (setq mode-line-format
;; '((""
;; mode-line-modified
;; mode-line-frame-control "%b %z%n "
;; mode-name
;; vc-mode
;; " "
;; mode-line-position
;; mode-line-misc-info
;; minor-mode-alist
;; mode-line-end-spaces "%-"
;; )))
;; Disable line numbers in modes
2023-10-02 16:20:56 +02:00
;; (dolist (mode '(org-mode-hook term-mode-hook shell-mode-hook eshell-mode-hook))
;; (add-hook mode (lambda () (display-line-numbers-mode 0))))
2023-10-02 16:04:07 +02:00
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)
(global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "C-x C-b") 'ibuffer-list-buffers)
;;(global-set-key (kbd "M-[") 'tab-bar-history-back)
;;(global-set-key (kbd "M-]") 'tab-bar-history-forward)
(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)
(setq compilation-ask-about-save nil)
(setq vc-handled-backends '(Git Hg)) ;; Only use Git and Hg for VC
(setq default-frame-alist
'((font . "MonoLisa-12")
(width . 92)
(height . 62)
(alpha . 100)
(fullscreen . maximized)
(horizontal-scroll-bar . nil)
(vertical-scroll-bar . nil)))
2023-10-02 16:04:07 +02:00
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((meta)) ((control) . text-scale)))
(require 'ido)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(setq ido-create-new-buffer 'always)
;(setq ido-file-extensions-order '(".org" ".lisp" ".py" ".txt" ".el" ".epub"))
(ido-mode t)
(fido-mode 1) ; replace icomplete mode
2023-10-02 16:05:31 +02:00
;;;
;;; bundle--encoding
;; UTF-8 FTW
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(setenv "PYTHONIOENCODING" "UTF-8")
;;;
2023-10-02 16:04:07 +02:00
2023-10-02 16:20:56 +02:00
;;; bundle--holidays
(setq holiday-oriental-holidays
'(()))
(setq holiday-islamic-holidays
'(()))
(setq holiday-bahai-holidays
'(()))
(setq holiday-hebrew-holidays
'(()))
(setq holiday-general-holidays
'((holiday-fixed 1 1 "Neujahr")
(holiday-fixed 5 1 "1. Mai")
(holiday-fixed 10 3 "Tag der Deutschen Einheit")))
(setq holiday-christian-holidays
'((holiday-float 12 0 -4 "1. Advent" 24)
(holiday-float 12 0 -3 "2. Advent" 24)
(holiday-float 12 0 -2 "3. Advent" 24)
(holiday-float 12 0 -1 "4. Advent" 24)
(holiday-fixed 12 25 "1. Weihnachtstag")
(holiday-fixed 12 26 "2. Weihnachtstag")
(holiday-fixed 1 6 "Heilige Drei Könige")
(holiday-easter-etc -48 "Rosenmontag")
;; (holiday-easter-etc -3 "Gründonnerstag")
(holiday-easter-etc -2 "Karfreitag")
(holiday-easter-etc 0 "Ostersonntag")
(holiday-easter-etc +1 "Ostermontag")
(holiday-easter-etc +39 "Christi Himmelfahrt")
(holiday-easter-etc +49 "Pfingstsonntag")
(holiday-easter-etc +50 "Pfingstmontag")
(holiday-easter-etc +60 "Fronleichnam")
(holiday-fixed 8 15 "Mariae Himmelfahrt")
(holiday-fixed 11 1 "Allerheiligen")
;; (holiday-float 11 3 1 "Buss- und Bettag" 16)
(holiday-float 11 0 1 "Totensonntag" 20)))
;;;
2023-10-02 16:22:35 +02:00
;;; bundle--server
(require 'server)
;; Start a server if (server-running-p) does not return t (e.g. if it
;; returns nil or :other)
(or (eq (server-running-p) t)
(server-start))
;;;
2023-10-02 16:20:56 +02:00
2023-02-06 16:27:42 +01:00
(load "bundle--customfile")
2020-08-20 18:47:45 +02:00
(load "bundle--package")
2022-05-06 19:31:15 +02:00
(load "bundle--org")
2022-10-24 10:18:36 +02:00
(load "bundle--ux")
2020-10-29 15:40:29 +01:00
(load "bundle--latex")
(load "bundle--mk")
2023-09-10 11:15:29 +02:00
(load "bundle--linux")