diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 90 |
1 files changed, 90 insertions, 0 deletions
@@ -0,0 +1,90 @@ +(setq user-full-name "Yann Herklotz") +(setq user-mail-address "yann@yannherklotz.com") + +(unless (string= system-type "darwin") + (menu-bar-mode -1)) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +(setq gc-cons-threshold (* 1024 1024 1024)) + +(setq-default fill-column 80) + +(setq inhibit-startup-message t) +(setq confirm-nonexistent-file-or-buffer nil) +(setq ring-bell-function 'ignore) + +(fset 'yes-or-no-p 'y-or-n-p) + +(when (eq system-type 'darwin) + (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) + +(defun prev-window () + (interactive) + (other-window -1)) + +(global-set-key (kbd "M-u") #'upcase-dwim) +(global-set-key (kbd "M-l") #'downcase-dwim) +(global-set-key (kbd "M-c") #'capitalize-dwim) +(global-set-key (kbd "C-c z") #'quick-calc) +(global-set-key (kbd "<f5>") #'revert-buffer) +(global-set-key (kbd "C-.") #'other-window) +(global-set-key (kbd "C-,") #'prev-window) +(global-set-key (kbd "C-\\") #'undo-only) + +(global-set-key (kbd "C-c l") #'org-store-link) +(global-set-key (kbd "C-c a") #'org-agenda) +(global-set-key (kbd "C-c c") #'org-capture) + +(defvar ymh/temporary-file-directory) +(setq ymh/temporary-file-directory (concat user-emacs-directory "backups")) +(setq backup-directory-alist + `((".*" . ,temporary-file-directory))) +(setq auto-save-file-name-transforms + `((".*" ,temporary-file-directory t))) + +(setq vc-follow-symlinks t) + +(setq-default indent-tabs-mode nil) +(setq-default tab-width 4) +(setq-default python-indent-offset 4) +(setq-default c-basic-offset 4) + +(setq line-number-display-limit 2000000) + +(define-prefix-command 'ymh-map) +(global-set-key (kbd "C-c y") 'ymh-map) + +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) +(setq straight-use-package-by-default t) + +(straight-use-package 'use-package) + +(use-package ef-themes + :config + (load-theme 'ef-autumn t)) + +(use-package pass + :bind (:map ymh-map + ("p" . password-store-copy) + ("i" . password-store-insert) + ("g" . password-store-generate))) + +(use-package magit) + +(setq gc-cons-threshold (* 1024 1024 10)) |