aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshton Wiersdorf <ashton.wiersdorf@pobox.com>2023-03-14 15:27:16 -0600
committerAshton Wiersdorf <ashton.wiersdorf@pobox.com>2023-03-14 15:28:44 -0600
commitfe99f00683ab087748be5c89f3cca4523bfbf536 (patch)
tree7d64f9c9c5a640bbeb1546778a66cb935de81a13
parentb05de096968ca584714f643611429fc7fbcef400 (diff)
Big update: add initial evil-mode (vim emulation) config; fix typos
-rw-r--r--README.md10
-rw-r--r--early-init.el2
-rw-r--r--mixins/dev.el2
-rw-r--r--mixins/ui.el8
-rw-r--r--mixins/vim-like.el41
5 files changed, 57 insertions, 6 deletions
diff --git a/README.md b/README.md
index 72e9515..cf40961 100644
--- a/README.md
+++ b/README.md
@@ -61,9 +61,9 @@ Mixins:
- UI Enhancements
- Development tools
- Org-mode (in development)
+ - Vim refugee (in development)
- Email (TODO: mu4e, EBDB)
- Researcher (TODO: citar, denote, org-roam, LaTeX)
- - Vim refugee (TODO: evil-mode)
#### `mixins/ui.el`
@@ -117,7 +117,7 @@ Yes, as of writing, Emacs 29.1 hasn't been released yet. The reason why is becau
## Development
-This is version `0.1.0`.
+This is version `0.2.0`.
Once I am happy with the state of things, I'll change it to version `1.*.*`—at that point, no new `use-package` declarations will be added to `init.el`.
@@ -129,6 +129,12 @@ See the [issue tracker](https://todo.sr.ht/~ashton314/emacs-bedrock) on SourceHu
## Changelog
+ - 0.2.0
+
+ 2023-03-14
+
+ Flesh out the `mixin/vim-like.el` so that there's *some* Vim configuration.
+
- 0.1.0
2023-01-17
diff --git a/early-init.el b/early-init.el
index 457ac15..313b696 100644
--- a/early-init.el
+++ b/early-init.el
@@ -15,7 +15,7 @@
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Startup speed, annoyance sppression
+;; Startup speed, annoyance suppression
(setq gc-cons-threshold 10000000)
(setq byte-compile-warnings '(not obsolete))
(setq warning-suppress-log-types '((comp) (bytecomp)))
diff --git a/mixins/dev.el b/mixins/dev.el
index 9f24b02..c92075e 100644
--- a/mixins/dev.el
+++ b/mixins/dev.el
@@ -32,7 +32,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-package markdown-mode
- :ensure t)
+ :hook ((markdown-mode . visual-line-mode)))
(use-package yaml-mode
:ensure t)
diff --git a/mixins/ui.el b/mixins/ui.el
index 54a71c0..4a3f003 100644
--- a/mixins/ui.el
+++ b/mixins/ui.el
@@ -74,10 +74,14 @@
;; Consult: Misc. enhanced commands
(use-package consult
:ensure t
+ ;; Other good things to bind: consult-ripgrep, consult-line-multi,
+ ;; consult-history, consult-outline, consult-error
:bind (("C-x b" . consult-buffer) ;; orig. switch-to-buffer
("M-y" . consult-yank-pop) ;; orig. yank-pop
- ("C-s" . consult-line) ;; orig. isearch
- ))
+ ("C-s" . consult-line)) ;; orig. isearch
+ :config
+ ;; Narrowing lets you restrict results to certain groups of candidates
+ (setq consult-narrow-key "<"))
(use-package eshell
:bind (("C-r" . consult-history)))
diff --git a/mixins/vim-like.el b/mixins/vim-like.el
index 6de8431..02468a3 100644
--- a/mixins/vim-like.el
+++ b/mixins/vim-like.el
@@ -15,8 +15,49 @@
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Evil: vi emulation
+(use-package evil
+ :ensure t
+ :init
+ (setq evil-respect-visual-line-mode t)
+ (setq evil-undo-system 'undo-redo)
+ (setq evil-want-keybinding nil) ; prep to load evil-collection
+ :config
+ (evil-mode)
+
+ ;; Configuring initial major mode for some modes
+ (evil-set-initial-state 'vterm-mode 'emacs))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Evil Enhancements
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Evil-collection: handy evil bindings for lots of different modes
+(use-package evil-collection
+ :ensure t
+ :after evil
+ :config
+ ;; Other good ones to enable: magit, mu4e, eglot, etc.
+ (evil-collection-init '(dired info))
+
+ ;; You can add evil-mode keybindings here; for example, when we're in
+ ;; special-mode, it usually means we're in some kind of uneditable buffer like
+ ;; a message popup etc. `q' will quit inside these windows instead of starting
+ ;; a macro recording.
+ (evil-collection-define-key 'normal 'special-mode-map
+ (kbd "q") 'quit-window))
+
+;; Evil-owl: preview what's in your vim registers
+(use-package evil-owl
+ :ensure t
+ :config
+ (setq evil-owl-idle-delay 0.3)
+ (setq evil-owl-max-string-length 500)
+ (add-to-list 'display-buffer-alist
+ '("*evil-owl*"
+ (display-buffer-in-side-window)
+ (side . bottom)
+ (window-height . 30)))
+ (evil-owl-mode))