summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-11-18 07:45:03 +0000
committerYann Herklotz <git@yannherklotz.com>2022-11-18 07:45:03 +0000
commit056747b5c4b17b768c6f9a9e72ad85bf6b0b7a5e (patch)
treec5ee1a199afeaa57ed4d3b8faed08565f2b33dd5
downloadymh-emacs-056747b5c4b17b768c6f9a9e72ad85bf6b0b7a5e.tar.gz
ymh-emacs-056747b5c4b17b768c6f9a9e72ad85bf6b0b7a5e.zip
Add init and early-init files
-rw-r--r--early-init.el1
-rw-r--r--init.el90
2 files changed, 91 insertions, 0 deletions
diff --git a/early-init.el b/early-init.el
new file mode 100644
index 0000000..512068a
--- /dev/null
+++ b/early-init.el
@@ -0,0 +1 @@
+(setq package-enable-at-startup nil)
diff --git a/init.el b/init.el
new file mode 100644
index 0000000..393b67f
--- /dev/null
+++ b/init.el
@@ -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))