diff options
author | User Mms <mms@voyager.local> | 2024-11-04 19:48:34 +0100 |
---|---|---|
committer | User Mms <mms@voyager.local> | 2024-11-04 19:48:34 +0100 |
commit | 3c18ae511d8da4e178c2919c8b2ec3160d86289c (patch) | |
tree | 0aca8fccb720291fda914cfcfbd4ff13f37174d7 /mms-keyboard.org | |
parent | adfcac49f7d1e14f5635e6e5443833a78cdf4e2a (diff) |
feat: evil mode agin
Diffstat (limited to 'mms-keyboard.org')
-rw-r--r-- | mms-keyboard.org | 105 |
1 files changed, 88 insertions, 17 deletions
diff --git a/mms-keyboard.org b/mms-keyboard.org index 4093c00..3f60222 100644 --- a/mms-keyboard.org +++ b/mms-keyboard.org @@ -23,20 +23,19 @@ WK adds a on-the-fly cheatsheet. #+end_src * Xah Lee Flykeys -# #+begin_src emacs-lisp - (use-package xah-fly-keys - :config - (xah-fly-keys-set-layout "qwerty") - (xah-fly-keys 1) - - (define-key xah-fly-command-map (kbd "SPC i o") 'consult-bookmark) - (define-key xah-fly-command-map (kbd "SPC i f") 'consult-find) - (define-key xah-fly-command-map (kbd "SPC i F") 'find-file) - (define-key xah-fly-command-map (kbd "SPC i g") 'consult-ripgrep) -(load-file "~/.emacs.d/ext/xah-fk-org.el") - - ) + ;; (use-package xah-fly-keys + ;; :config + ;; (xah-fly-keys-set-layout "qwerty") + ;; (xah-fly-keys 1) + ;; + ;; (define-key xah-fly-command-map (kbd "SPC i o") 'consult-bookmark) + ;; (define-key xah-fly-command-map (kbd "SPC i f") 'consult-find) + ;; (define-key xah-fly-command-map (kbd "SPC i F") 'find-file) + ;; (define-key xah-fly-command-map (kbd "SPC i g") 'consult-ripgrep) + ;; ( + ;; load-file "~/.emacs.d/ext/xah-fk-org.el") + ;; ) #+end_src @@ -46,10 +45,82 @@ Avy is a quick jump-to-place package. I use it in a very basic way. #+begin_src emacs-lisp - (use-package avy - :after xah-fly-keys + ;; (use-package avy + ;; :ensure t) + + ;; :after xah-fly-keys + ;; :config + ;; (define-key xah-fly-command-map (kbd "-") 'avy-goto-char-timer) + ;; ) +#+end_src + +* VI keys + +#+begin_src emacs-lisp + (use-package evil + :ensure t + :init + :config + (evil-mode 1)) + + (use-package general + :ensure t :config - (define-key xah-fly-command-map (kbd "-") 'avy-goto-char-timer) - ) + (general-evil-setup)) + + (elpaca-wait) #+end_src +#+begin_src emacs-lisp +(use-package fzf + :config + (setq fzf/args "-x --color bw --print-query --margin=1,0 --no-hscroll" + fzf/executable "fzf" + fzf/git-grep-args "-i --line-number %s" + ;; command used for `fzf-grep-*` functions + ;; example usage for ripgrep: + ;; fzf/grep-command "rg --no-heading -nH" + fzf/grep-command "grep -nrH" + ;; If nil, the fzf buffer will appear at the top of the window + fzf/position-bottom t + fzf/window-height 15)) +#+end_src + +#+begin_src emacs-lisp + (general-create-definer my-leader-def + :keymaps 'override + :prefix "SPC" + :states '(normal motion emacs)) + + ;; Git + (my-leader-def "g" 'magit) + + ;; Navigation + (my-leader-def "io" 'consult-bookmark) + (my-leader-def "ib" 'bookmark-set) + (my-leader-def "if" 'fzf-git-files) + (my-leader-def "ig" 'fzf-grep-dwim-with-narrowing) + + ;; (define-key xah-fly-command-map (kbd "SPC i o") 'consult-bookmark) + ;; (define-key xah-fly-command-map (kbd "SPC i f") 'consult-find) + ;; (define-key xah-fly-command-map (kbd "SPC i F") 'find-file) + ;; (define-key xah-fly-command-map (kbd "SPC i g") 'consult-ripgrep) + ;; Email + (my-leader-def "mm" 'notmuch) +#+end_src + +#+begin_src emacs-lisp +(general-define-key + :keymaps 'override + "C-h" 'evil-window-left + "C-l" 'evil-window-right + "C-k" 'evil-window-up + "C-j" 'evil-window-down + "C-x h" 'previous-buffer + "C-x l" 'next-buffer) + +(general-define-key + :keymaps 'evil-window-map + "x" 'kill-buffer-and-window + "d" 'kill-current-buffer) +#+end_src |