diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-02-23 14:54:50 -0800 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-02-23 14:54:50 -0800 |
| commit | 9a1227ee7d4377e3d91b84c4f69febcb04dccfae (patch) | |
| tree | 8e2fe295c91ba52b044938ae8c294ec7a635de37 /config/emacs | |
| parent | 0786d01dc1d041f2035fe0dfe9e2a35aa8843380 (diff) | |
emacs projectile and modal tweaks
Diffstat (limited to 'config/emacs')
| -rw-r--r-- | config/emacs/init.el | 5 | ||||
| -rw-r--r-- | config/emacs/site-lisp/my-modal.el | 22 |
2 files changed, 21 insertions, 6 deletions
diff --git a/config/emacs/init.el b/config/emacs/init.el index 24416ea..addc3d7 100644 --- a/config/emacs/init.el +++ b/config/emacs/init.el @@ -732,6 +732,11 @@ With ARG, don't save the current layout." ;; (use-package embark-consult ;; :after embark consult) +(use-package projectile + :config + (projectile-mode 1) + (define-key projectile-mode-map (kbd "C-x P") 'projectile-command-map)) + (use-package hl-todo ; highlight certain keywords :hook (prog-mode . hl-todo-mode)) diff --git a/config/emacs/site-lisp/my-modal.el b/config/emacs/site-lisp/my-modal.el index 6fc6f18..0220ac4 100644 --- a/config/emacs/site-lisp/my-modal.el +++ b/config/emacs/site-lisp/my-modal.el @@ -89,8 +89,8 @@ trigger EFFECT or consult UNTIL." "~" "!" "@" "#" "%" "^" "&" "*" "(" ")" "_" "+" "Q" "W" "R" "T" "Y" "U" "|" - "S" "D" "F" "H" "J" "K" "L" ":" "\"" ,(kbd "<return>") - "Z" "X" "C" "V" "N" "M" "<" ">" + "S" "F" "H" "J" "K" "L" ":" "\"" ,(kbd "<return>") + "Z" "X" "V" "N" "M" "<" ">" )) (defvar-local mm/state 'nil) @@ -146,6 +146,7 @@ trigger EFFECT or consult UNTIL." (,(kbd "SPC") . set-mark-command) ("u" . undo) ("p" . yank) + ("P" . yank) ;; mixing vi/emacs meanings of yank ("y" . ,(mm/transition-state 'mm/yank-state-mode)) @@ -162,7 +163,11 @@ trigger EFFECT or consult UNTIL." nil)) ("d" . ,(mm/transition-state 'mm/delete-state-mode)) + ("D" . kill-line) ("c" . ,(mm/transition-state 'mm/change-state-mode)) + ("C" . ,(mm/compose-command ((kill-line nil)) + (mm/transition-state 'mm/base-state-mode) + nil)) ("o" . ,(mm/compose-command ((move-end-of-line nil) (newline) @@ -174,7 +179,10 @@ trigger EFFECT or consult UNTIL." (funcall indent-line-function)) (mm/transition-state 'mm/base-state-mode) nil)) - ("x" . delete-char)) + ("x" . delete-char) + + ("/" . isearch-forward-regexp) + ("?" . isearch-backward-regexp)) nil nil) @@ -298,7 +306,8 @@ trigger EFFECT or consult UNTIL." ("y" . ,(mm/compose-command ((pop-mark) (move-beginning-of-line nil) (push-mark) - (move-end-of-line nil)) + (move-end-of-line nil) + (forward-char 1)) 'mm/do-nothing nil)) ) @@ -317,8 +326,9 @@ trigger EFFECT or consult UNTIL." ((progn ;; disable (unless (or mm/disable-delete (eq this-command 'keyboard-quit)) - (copy-region-as-kill nil nil t)) - ))) + (progn + (copy-region-as-kill nil nil t) + (pop-to-mark-command)))))) (mapc (lambda (mode) (add-to-list 'minions-prominent-modes mode)) mm/all-states) |
