summaryrefslogtreecommitdiff
path: root/config/editor.el
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2025-05-29 22:46:08 +0100
committerSam Light <samlight1994@gmail.com>2025-05-29 22:46:08 +0100
commit38b43a176a0b24e985515de9c7df913675f587f3 (patch)
tree573482bb367e047470193ef48c73c55b614f089a /config/editor.el
parent3fc135d11dfea3f84e95549c239376e85b6f8003 (diff)
Minor improvements and gitignore filesHEADmaster
Diffstat (limited to 'config/editor.el')
-rw-r--r--config/editor.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/config/editor.el b/config/editor.el
index 677b4df..b032129 100644
--- a/config/editor.el
+++ b/config/editor.el
@@ -1,7 +1,7 @@
;; -*- lexical-binding: t; -*-
(use-package emacs
- :init
+ :config
;; Set all unicode
(set-charset-priority 'unicode)
(setq locale-coding-system 'utf-8
@@ -29,7 +29,13 @@
(global-subword-mode t)
- (add-hook 'prog-mode-hook (lambda () (modify-syntax-entry ?_ "_"))))
+ (add-hook 'prog-mode-hook (lambda () (modify-syntax-entry ?_ "_")))
+
+ ;; store all backup and autosave files in the tmp dir
+ (setq backup-directory-alist
+ `((".*" . ,temporary-file-directory)))
+ (setq auto-save-file-name-transforms
+ `((".*" ,temporary-file-directory t))))
;; meaningful names for buffers with the same name
(use-package uniquify
@@ -113,7 +119,9 @@
(([remap move-beginning-of-line] . crux-move-beginning-of-line)
("C-c o" . crux-open-with)
("C-<backspace>" . crux-kill-line-backwards)
- ([remap kill-whole-line] . crux-kill-whole-line)))
+ ([remap kill-whole-line] . crux-kill-whole-line))
+ :config
+ (crux-with-region-or-line kill-region))
;; nfkjbndfkb kdjbnkfjb
(use-package flyspell