emacs: copy some zed/vim keybinds
Alan Pearce alan@alanpearce.eu
Sun, 09 Feb 2025 19:23:47 +0100
1 files changed, 9 insertions(+), 3 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -256,7 +256,8 @@ mac-control-modifier 'control mac-right-control-modifier 'left mac-command-modifier 'super mac-right-command-modifier 'left - mac-function-modifier 'hyper)) + mac-function-modifier 'hyper) + (define-key global-map (kbd "s-w") #'kill-this-buffer)) (use-package avy :defer 2 @@ -471,8 +472,9 @@ (:states 'motion "C-;" #'evil-avy-goto-line) (:states 'normal ";" #'evil-ex) - (:states '(normal motion) - "g s" #'evil-avy-goto-symbol-1)) + (:states '(normal) + "g s" #'consult-imenu + "g S" #'my/ls-consult-symbol)) (add-hook 'c-mode-common-hook ; make b/w/e include underscore as *part* of a word (lambda () (modify-syntax-entry ?_ "w"))) @@ -484,6 +486,10 @@ :config (global-anzu-mode +1)) (use-package evil-collection :demand t + :general ( :keymaps 'evil-collection-unimpaired-mode-map + :states 'normal + "[ d" #'evil-collection-unimpaired-previous-error + "] d" #'evil-collection-unimpaired-next-error) :config (progn (setq evil-collection-magit-use-y-for-yank nil evil-collection-corfu-key-themes '(default magic-return))