refactor(doom): move keybindings into separate file

This commit is contained in:
Infinidoge 2022-05-02 00:06:40 -04:00
parent 61fd1b2b12
commit 6e75cde834
2 changed files with 61 additions and 60 deletions

View file

@ -80,66 +80,6 @@
;; --- LSP ---
(setq lsp-csharp-server-path (executable-find "omnisharp"))
;; --- Keybindings ---
(map!
;; Remove scroll-left and scroll-right keybindings
"C-<next>" nil
"C-<prior>" nil
)
(map! :map evil-window-map
;; Unbind Vim HJKL keys
"h" nil
"H" nil
"C-h" nil
"C-S-h" nil
"j" nil
"J" nil
"C-j" nil
"C-S-j" nil
"k" nil
"K" nil
"C-k" nil
"C-S-k" nil
"l" nil
"L" nil
"C-l" nil
"C-S-l" nil
;; Rebind to arrow keys
"<left>" #'evil-window-left
"C-<left>" #'evil-window-left
"S-<left>" #'+evil/window-move-left
"C-S-<left>" #'evil-window-move-far-left
"<right>" #'evil-window-right
"C-<right>" #'evil-window-right
"S-<right>" #'+evil/window-move-right
"C-S-<right>" #'evil-window-move-far-right
"<up>" #'evil-window-up
"C-<up>" #'evil-window-up
"S-<up>" #'+evil/window-move-up
"C-S-<up>" #'evil-window-move-very-top
"<down>" #'evil-window-down
"C-<down>" #'evil-window-down
"S-<down>" #'+evil/window-move-down
"C-S-<down>" #'evil-window-move-very-bottom
)
(map! :map which-key-C-h-map
"j" nil
"<right>" #'which-key-show-next-page-cycle
"k" nil
"<left>" #'which-key-show-previous-page-cycle
)
;; Set doom-private-dir to the writeable location, as opposed to read-only symlink in $DOOMDIR
(setq doom-private-dir "/etc/nixos/users/infinidoge/config/doom")
;; Disable excessive warnings in configuration directory
@ -182,3 +122,4 @@
;; Other configuration files
(load! "config/org")
(load! "config/keybindings")

View file

@ -0,0 +1,60 @@
;; --- Keybindings ---
(map!
;; Remove scroll-left and scroll-right keybindings
"C-<next>" nil
"C-<prior>" nil
)
(map!
:map evil-window-map
;; Unbind Vim HJKL keys
"h" nil
"H" nil
"C-h" nil
"C-S-h" nil
"j" nil
"J" nil
"C-j" nil
"C-S-j" nil
"k" nil
"K" nil
"C-k" nil
"C-S-k" nil
"l" nil
"L" nil
"C-l" nil
"C-S-l" nil
;; Rebind to arrow keys
"<left>" #'evil-window-left
"C-<left>" #'evil-window-left
"S-<left>" #'+evil/window-move-left
"C-S-<left>" #'evil-window-move-far-left
"<right>" #'evil-window-right
"C-<right>" #'evil-window-right
"S-<right>" #'+evil/window-move-right
"C-S-<right>" #'evil-window-move-far-right
"<up>" #'evil-window-up
"C-<up>" #'evil-window-up
"S-<up>" #'+evil/window-move-up
"C-S-<up>" #'evil-window-move-very-top
"<down>" #'evil-window-down
"C-<down>" #'evil-window-down
"S-<down>" #'+evil/window-move-down
"C-S-<down>" #'evil-window-move-very-bottom
)
(map!
:map which-key-C-h-map
"j" nil
"<right>" #'which-key-show-next-page-cycle
"k" nil
"<left>" #'which-key-show-previous-page-cycle
)