Drop use-package in keybindings.el
I'm attempting to kill that zombie bug about evil-want-keybinding...
This commit is contained in:
parent
39622607ff
commit
53be40b1a6
1 changed files with 63 additions and 79 deletions
|
@ -29,20 +29,20 @@
|
||||||
(require 'buffer)
|
(require 'buffer)
|
||||||
(require 'display)
|
(require 'display)
|
||||||
(require 'device)
|
(require 'device)
|
||||||
(require 'evil-ex)
|
|
||||||
|
|
||||||
(use-package evil
|
;; Note: The following lines must be sorted this way.
|
||||||
:init
|
(setq evil-want-integration t)
|
||||||
;; Should remove the warning messages on init.
|
(setq evil-want-keybinding nil)
|
||||||
(setq evil-want-integration t)
|
(general-evil-setup)
|
||||||
;; TODO: Troubleshoot why this binding causes the following warning:
|
(require 'evil)
|
||||||
;; "Warning (evil-collection): `evil-want-keybinding' was set to nil but not
|
(require 'evil-collection)
|
||||||
;; before loading evil."
|
(require 'evil-magit)
|
||||||
(setq evil-want-keybinding nil)
|
(require 'evil-commentary)
|
||||||
(general-evil-setup)
|
(require 'evil-surround)
|
||||||
:config
|
(require 'key-chord)
|
||||||
;; Ensure that evil's command mode behaves with readline bindings.
|
|
||||||
(general-define-key
|
;; Ensure that evil's command mode behaves with readline bindings.
|
||||||
|
(general-define-key
|
||||||
:keymaps 'evil-ex-completion-map
|
:keymaps 'evil-ex-completion-map
|
||||||
"C-a" #'move-beginning-of-line
|
"C-a" #'move-beginning-of-line
|
||||||
"C-e" #'move-end-of-line
|
"C-e" #'move-end-of-line
|
||||||
|
@ -56,9 +56,8 @@
|
||||||
"M-d" #'kill-word
|
"M-d" #'kill-word
|
||||||
"M-DEL" #'backward-kill-word
|
"M-DEL" #'backward-kill-word
|
||||||
"C-b" #'backward-char)
|
"C-b" #'backward-char)
|
||||||
;; TODO: Ensure all of my custom keybindings end up in a single map that is
|
|
||||||
;; easy to enable or disable.
|
(general-mmap
|
||||||
(general-mmap
|
|
||||||
:keymaps 'override
|
:keymaps 'override
|
||||||
"RET" #'evil-goto-line
|
"RET" #'evil-goto-line
|
||||||
"H" #'evil-first-non-blank
|
"H" #'evil-first-non-blank
|
||||||
|
@ -69,7 +68,8 @@
|
||||||
"sh" #'evil-window-vsplit
|
"sh" #'evil-window-vsplit
|
||||||
"sk" #'evil-window-split
|
"sk" #'evil-window-split
|
||||||
"sj" #'wpc/evil-window-split-down)
|
"sj" #'wpc/evil-window-split-down)
|
||||||
(general-nmap
|
|
||||||
|
(general-nmap
|
||||||
:keymaps 'override
|
:keymaps 'override
|
||||||
"gd" #'xref-find-definitions
|
"gd" #'xref-find-definitions
|
||||||
;; Wrapping `xref-find-references' in the `let' binding to prevent xref from
|
;; Wrapping `xref-find-references' in the `let' binding to prevent xref from
|
||||||
|
@ -81,11 +81,16 @@
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((xref-prompt-for-identifier nil))
|
(let ((xref-prompt-for-identifier nil))
|
||||||
(call-interactively #'xref-find-references))))
|
(call-interactively #'xref-find-references))))
|
||||||
(general-unbind 'motion "M-." "C-p" "<SPC>")
|
|
||||||
(general-unbind 'normal "s" "M-." "C-p" "C-n")
|
(general-unbind 'motion "M-." "C-p" "<SPC>")
|
||||||
(general-unbind 'insert "C-v" "C-d" "C-a" "C-e" "C-n" "C-p" "C-k")
|
(general-unbind 'normal "s" "M-." "C-p" "C-n")
|
||||||
(setq evil-symbol-word-search t)
|
(general-unbind 'insert "C-v" "C-d" "C-a" "C-e" "C-n" "C-p" "C-k")
|
||||||
(evil-mode 1))
|
|
||||||
|
(setq evil-symbol-word-search t)
|
||||||
|
(evil-mode 1)
|
||||||
|
(evil-collection-init)
|
||||||
|
(evil-commentary-mode)
|
||||||
|
(global-evil-surround-mode 1)
|
||||||
|
|
||||||
;; Ensure the Evil search results get centered vertically.
|
;; Ensure the Evil search results get centered vertically.
|
||||||
(progn
|
(progn
|
||||||
|
@ -99,29 +104,8 @@
|
||||||
(after advice-for-evil-search-previous activate)
|
(after advice-for-evil-search-previous activate)
|
||||||
(evil-scroll-line-to-center (line-number-at-pos))))
|
(evil-scroll-line-to-center (line-number-at-pos))))
|
||||||
|
|
||||||
(use-package evil-collection
|
(key-chord-mode 1)
|
||||||
:after (evil)
|
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
|
||||||
:config
|
|
||||||
(evil-collection-init))
|
|
||||||
|
|
||||||
(use-package evil-magit)
|
|
||||||
|
|
||||||
;; create comments easily
|
|
||||||
(use-package evil-commentary
|
|
||||||
:after (evil)
|
|
||||||
:config
|
|
||||||
(evil-commentary-mode))
|
|
||||||
|
|
||||||
(use-package evil-surround
|
|
||||||
:after (evil)
|
|
||||||
:config
|
|
||||||
(global-evil-surround-mode 1))
|
|
||||||
|
|
||||||
(use-package key-chord
|
|
||||||
:after (evil)
|
|
||||||
:config
|
|
||||||
(key-chord-mode 1)
|
|
||||||
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; General KBDs
|
;; General KBDs
|
||||||
|
|
Loading…
Reference in a new issue