155 lines
4.8 KiB
EmacsLisp
155 lines
4.8 KiB
EmacsLisp
(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-format "W%V %a %d %b %R")
|
|
(setq display-time-24hr-format t)
|
|
|
|
;; Cursor and mouse
|
|
(column-number-mode 1)
|
|
(mouse-wheel-mode 1)
|
|
(blink-cursor-mode -1)
|
|
|
|
(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-default tab-width 4)
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default line-spacing nil)
|
|
(setq-default make-backup-files nil)
|
|
(setq-default next-line-add-newlines t)
|
|
|
|
;; Miscellaneous
|
|
(require 'cl-lib)
|
|
(setq default-major-mode 'text-mode)
|
|
(setq inhibit-startup-buffer-menu t inhibit-startup-screen t)
|
|
(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)
|
|
|
|
(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 horizontal-scroll-bar nil)
|
|
(setq vertical-scroll-bar nil)
|
|
|
|
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((meta)) ((control) . text-scale)))
|
|
|
|
(setq completion-auto-wrap t)
|
|
(setq completions-format 'one-column)
|
|
(setq completions-header-format nil)
|
|
(setq completions-max-height 20)
|
|
(setq completion-auto-select nil)
|
|
;; (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
|
|
;(fido-vertical-mode 1)
|
|
;;;
|
|
|
|
;;; bundle--encoding
|
|
;; UTF-8 FTW
|
|
(prefer-coding-system 'utf-8-unix)
|
|
(set-default-coding-systems 'utf-8-unix)
|
|
(set-terminal-coding-system 'utf-8)
|
|
(set-keyboard-coding-system 'utf-8)
|
|
(setq default-buffer-file-coding-system 'utf-8-unix)
|
|
(setenv "PYTHONIOENCODING" "UTF-8")
|
|
|
|
;;; bundle--customfile
|
|
(when (eq system-type 'gnu/linux)
|
|
(setq custom-file "~/.emacs.d/bundle/custom_gnu.el"
|
|
browse-url-secondary-browser-function 'browse-url-firefox)
|
|
(unless (file-directory-p "~/cl-sites/")
|
|
(async-shell-command "git clone git@git.sr.ht:~marcuskammer/cl-sites ~/cl-sites")))
|
|
|
|
(when (eq system-type 'windows-nt)
|
|
(setq explicit-shell-file-name
|
|
(seq-find 'file-executable-p
|
|
'("C:\\Program Files\\PowerShell\\7\\pwsh.exe"
|
|
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")))
|
|
(setq explicit-powershell.exe-args '("-NoProfile" "-InputFormat" "Text"))
|
|
(setq custom-file "~/.emacs.d/bundle/custom_win32.el")
|
|
|
|
(when (string= system-name "XPS-8930")
|
|
(cd "~/")
|
|
(setq custom-file "~/.emacs.d/bundle/custom_win32_XPS8930.el"))
|
|
|
|
(when (string= system-name "EVG03435NB")
|
|
(cd "~/OneDrive - Siemens AG/")
|
|
(setq custom-file "~/.emacs.d/bundle/custom_win32_EVG03435NB.el")))
|
|
|
|
(load custom-file :noerror)
|
|
|
|
(setq package-archives
|
|
'(("melpa" . "https://melpa.org/packages/")
|
|
("org" . "https://orgmode.org/elpa/")
|
|
("elpa" . "https://elpa.gnu.org/packages/")
|
|
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
|
|
(package-initialize)
|
|
(unless package-archive-contents
|
|
(package-refresh-contents))
|
|
(unless (package-installed-p 'use-package)
|
|
(package-install 'use-package))
|
|
(require 'use-package)
|
|
(setq use-package-always-ensure t)
|
|
|
|
(use-package doom-themes
|
|
:init
|
|
(load-theme 'doom-one t)
|
|
:config
|
|
(setq doom-themes-enable-bold t
|
|
doom-themes-enable-italic t))
|
|
|
|
(add-hook 'text-mode-hook 'flyspell-mode)
|
|
|
|
(setq world-clock-time-format "%a %d %b %R %Z")
|
|
|
|
(setq world-clock-list
|
|
'(("America/Los_Angeles" "Seattle")
|
|
("America/New_York" "New York")
|
|
("Europe/London" "London")
|
|
("Europe/Paris" "Paris")
|
|
("Europe/Sofia" "Sofia")
|
|
("Asia/Calcutta" "Bangalore")
|
|
("Asia/Tokyo" "Tokyo")))
|
|
|
|
(auto-insert-mode 1)
|
|
|
|
(setq auto-insert-alist
|
|
(append '((("\\.lisp\\'" . "Lisp header")
|
|
nil
|
|
";;;; -*- mode: common-lisp; coding: utf-8; -*-\n"))
|
|
auto-insert-alist))
|