Browse Source

Fix flyspell menu, reorder keybindings sections

master
Riyyi 3 years ago
parent
commit
ec3cd49dfc
  1. 54
      .config/emacs/config.org

54
.config/emacs/config.org

@ -590,7 +590,6 @@ Give Flyspell a selection menu.
#+BEGIN_SRC emacs-lisp
(use-package flyspell-correct
:defer t
:after flyspell
:config
(setq flyspell-issue-message-flag nil)
@ -1686,28 +1685,16 @@ Set keybinds to functionality of installed packages.
#+BEGIN_SRC emacs-lisp
;; Buffers
(global-set-key (kbd "M-h") 'centaur-tabs-backward-tab)
(global-set-key (kbd "M-j") 'centaur-tabs-forward-group)
(global-set-key (kbd "M-k") 'centaur-tabs-backward-group)
(global-set-key (kbd "M-l") 'centaur-tabs-forward-tab)
(global-set-key (kbd "M-H") 'centaur-tabs-move-current-tab-to-left)
(global-set-key (kbd "M-L") 'centaur-tabs-move-current-tab-to-right)
(global-set-key (kbd "M-\`") 'evil-switch-to-windows-last-buffer)
(global-set-key (kbd "M-s") 'avy-goto-char-timer)
(global-set-key (kbd "M-x") 'dot/M-x)
(global-set-key (kbd "M-h") #'centaur-tabs-backward-tab)
(global-set-key (kbd "M-j") #'centaur-tabs-forward-group)
(global-set-key (kbd "M-k") #'centaur-tabs-backward-group)
(global-set-key (kbd "M-l") #'centaur-tabs-forward-tab)
(global-set-key (kbd "M-H") #'centaur-tabs-move-current-tab-to-left)
(global-set-key (kbd "M-L") #'centaur-tabs-move-current-tab-to-right)
(global-set-key (kbd "M-\`") #'evil-switch-to-windows-last-buffer)
;; flyspell-correct
(with-eval-after-load 'flyspell-correct
(global-set-key [remap ispell-word] #'flyspell-correct-at-point)) ; z=
;; Helpful overwrite default help functions
(global-set-key [remap describe-command] #'helpful-command)
(global-set-key [remap describe-function] #'helpful-callable)
(global-set-key [remap describe-key] #'helpful-key)
(global-set-key [remap describe-symbol] #'helpful-at-point)
(global-set-key [remap describe-variable] #'helpful-variable)
(which-key-add-key-based-replacements "C-h o" "describe-symbol-at-point")
(global-set-key (kbd "M-s") #'avy-goto-char-timer)
(global-set-key (kbd "M-x") #'dot/M-x)
;; Company completion selection
(with-eval-after-load 'company
@ -1718,14 +1705,25 @@ Set keybinds to functionality of installed packages.
(define-key company-active-map (kbd "M-k") #'company-select-previous)
(define-key company-active-map (kbd "M-l") #'company-complete-selection)
(define-key company-active-map (kbd "<escape>") #'company-abort))
; https://github.com/company-mode/company-mode/blob/master/company.el#L661
;; Evil command history selection
(with-eval-after-load 'evil-ex
(define-key evil-ex-completion-map (kbd "M-h") 'abort-recursive-edit)
(define-key evil-ex-completion-map (kbd "M-h") #'abort-recursive-edit)
(define-key evil-ex-completion-map (kbd "M-j") #'next-complete-history-element)
(define-key evil-ex-completion-map (kbd "M-k") #'previous-complete-history-element)
(define-key evil-ex-completion-map (kbd "M-l") 'exit-minibuffer))
(define-key evil-ex-completion-map (kbd "M-l") #'exit-minibuffer))
;; flyspell-correct
(with-eval-after-load 'flyspell-correct
(global-set-key [remap ispell-word] #'flyspell-correct-at-point)) ; z=
;; Helpful overwrite default help functions
(global-set-key [remap describe-command] #'helpful-command)
(global-set-key [remap describe-function] #'helpful-callable)
(global-set-key [remap describe-key] #'helpful-key)
(global-set-key [remap describe-symbol] #'helpful-at-point)
(global-set-key [remap describe-variable] #'helpful-variable)
(which-key-add-key-based-replacements "C-h o" "describe-symbol-at-point")
;; Minibuffer completion selection
(general-def minibuffer-local-map
@ -1738,12 +1736,6 @@ Set keybinds to functionality of installed packages.
"<backspace>" #'dot/selectrum-backspace
"<S-backspace>" #'evil-delete-backward-char-and-join)
; Overwrite evil keymaps
;(evil-global-set-key 'motion (kbd "C-w") 'kill-this-buffer)
;(evil-define-key 'motion 'global (kbd "C-w") 'kill-this-buffer)
;(define-key evil-motion-state-map (kbd "C-w") 'kill-this-buffer) ; @Todo test this with nil
;https://github.com/noctuid/evil-guide#global-keybindings-and-evil-states
;; with-editor
(with-eval-after-load 'with-editor
(define-key with-editor-mode-map (kbd "M-c") 'with-editor-finish)

Loading…
Cancel
Save