diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-09 18:05:30 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-09 18:07:37 +0000 |
commit | 7e5ff6053ed29610e05d676b77e8b1bfd71a4a97 (patch) | |
tree | 5e125bfd1bb9897587dc5cd515355c5f96a2ad4c /Emacs/.config/emacs/config.org | |
parent | f54cfefe5c722d50c3f6f11ae34f5714686bbad7 (diff) | |
download | dotfiles-7e5ff6053ed29610e05d676b77e8b1bfd71a4a97.tar.gz dotfiles-7e5ff6053ed29610e05d676b77e8b1bfd71a4a97.tar.bz2 dotfiles-7e5ff6053ed29610e05d676b77e8b1bfd71a4a97.zip |
(Emacs)~set states for bindings from normal to normal & motion
Motion state is used in compilation buffers, which is why my bindings
never seemed to work in them. So to counteract this just set all
bindings to both normal and motion states.
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 264028d..3eb3084 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -236,13 +236,13 @@ and it's functionally equivalent the doom/spacemacs leader. :demand t :config (general-def - :states 'normal + :states '(normal motion) "SPC" nil "M-V" #'dx:newline "M-v" (proc (interactive) (dx:newline 1))) (general-create-definer leader - :states 'normal + :states '(normal motion) :keymaps 'override :prefix "SPC") @@ -258,7 +258,7 @@ moment), bind to general some basic binds. :straight nil :general (general-def - :states 'normal + :states '(normal motion) "C--" #'text-scale-decrease "C-=" #'text-scale-increase)) @@ -332,9 +332,10 @@ Setup the evil package, with some basic keybinds. :hook (after-init-hook . evil-mode) :general (general-def - :states 'normal + :states '(normal motion) "TAB" #'evil-jump-item - "r" #'evil-replace-state) + "r" #'evil-replace-state + "zC" #'hs-hide-level) (general-def :states 'visual :keymaps 'emacs-lisp-mode-map @@ -526,7 +527,7 @@ looking for a command. :general (general-def :keymaps 'completion-list-mode-map - :states 'normal + :states '(normal motion) "l" #'next-completion "h" #'previous-completion "ESC" #'delete-completion-window @@ -965,7 +966,7 @@ Setup avy with leader. As I use =avy-goto-char-timer= a lot, use the :infix "s" "l" #'avy-goto-line) (general-def - :states 'normal + :states '(normal motion) (kbd "M-s") #'avy-goto-char-timer)) #+end_src ** Ace window @@ -981,7 +982,7 @@ window can provide some nicer chords for higher management of windows (aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) :general (general-def - :states 'normal + :states '(normal motion) [remap evil-window-next] #'ace-window)) #+end_src ** Helpful @@ -1097,7 +1098,7 @@ initial startup screen in default Emacs. (dashboard-setup-startup-hook) (general-def - :states 'normal + :states '(normal motion) :keymaps 'dashboard-mode-map "r" #'dashboard-jump-to-recent-files "p" #'dashboard-jump-to-projects @@ -1201,7 +1202,7 @@ user wants to open current file. Bind it to =aU= in the leader. (leader "au" #'xwidget-webkit-browse-url "aU" #'+xwidget/render-file) (general-def - :states 'normal + :states '(normal motion) :keymaps 'xwidget-webkit-mode-map "q" #'quit-window "h" #'xwidget-webkit-scroll-backward @@ -1307,7 +1308,7 @@ to elfeed for loading the system. :general (leader "ar" #'elfeed) (general-def - :states 'normal + :states '(normal motion) :keymaps 'elfeed-search-mode-map "gr" #'elfeed-update "s" #'elfeed-search-live-filter @@ -1488,7 +1489,7 @@ flyspell-mode should be hooked to text-mode. :hook (text-mode-hook . flyspell-mode) :general (general-def - :states 'normal + :states '(normal motion) :keymaps 'text-mode-map (kbd "M-a") #'flyspell-correct-word-before-point (kbd "M-A") #'flyspell-auto-correct-word)) @@ -1503,7 +1504,7 @@ limit), so set it for specific modes need the help. :straight nil :general (general-def - :states 'normal + :states '(normal motion) "M--" #'whitespace-cleanup) :hook (before-save-hook . whitespace-cleanup) @@ -1781,7 +1782,7 @@ Some bindings for org mode. "aa" #'org-agenda "fa" (proc (interactive) (find-file (car org-agenda-files)))) (general-def - :states 'normal + :states '(normal motion) :keymaps 'org-mode-map "C-c ;" #'org-property-action)) #+end_src |