|
|
@ -844,89 +844,97 @@ Disable spacebar in evil motion. |
|
|
|
** Package |
|
|
|
** Package |
|
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
;; Buffers |
|
|
|
;; Buffers |
|
|
|
(global-set-key (kbd "M-h") 'centaur-tabs-backward-tab) |
|
|
|
(global-set-key (kbd "M-h") 'centaur-tabs-backward-tab) |
|
|
|
(global-set-key (kbd "M-l") 'centaur-tabs-forward-tab) |
|
|
|
(global-set-key (kbd "M-l") 'centaur-tabs-forward-tab) |
|
|
|
(global-set-key (kbd "C-M-h") 'centaur-tabs-move-current-tab-to-left) |
|
|
|
(global-set-key (kbd "C-M-h") 'centaur-tabs-move-current-tab-to-left) |
|
|
|
(global-set-key (kbd "C-M-l") 'centaur-tabs-move-current-tab-to-right) |
|
|
|
(global-set-key (kbd "C-M-l") 'centaur-tabs-move-current-tab-to-right) |
|
|
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "M-x") 'smex) |
|
|
|
(global-set-key (kbd "M-x") 'smex) |
|
|
|
|
|
|
|
|
|
|
|
;; Company completion selection |
|
|
|
;; Company completion selection |
|
|
|
(with-eval-after-load 'company |
|
|
|
(with-eval-after-load 'company |
|
|
|
(define-key company-active-map (kbd "M-n") nil) |
|
|
|
(define-key company-active-map (kbd "M-n") nil) |
|
|
|
(define-key company-active-map (kbd "M-p") nil) |
|
|
|
(define-key company-active-map (kbd "M-p") nil) |
|
|
|
(define-key company-active-map (kbd "M-h") #'company-abort) |
|
|
|
(define-key company-active-map (kbd "M-h") #'company-abort) |
|
|
|
(define-key company-active-map (kbd "M-j") #'company-select-next) |
|
|
|
(define-key company-active-map (kbd "M-j") #'company-select-next) |
|
|
|
(define-key company-active-map (kbd "M-k") #'company-select-previous) |
|
|
|
(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 "M-l") #'company-complete-selection) |
|
|
|
(define-key company-active-map (kbd "<escape>") #'company-abort)) |
|
|
|
(define-key company-active-map (kbd "<escape>") #'company-abort)) |
|
|
|
; https://github.com/company-mode/company-mode/blob/master/company.el#L661 |
|
|
|
; https://github.com/company-mode/company-mode/blob/master/company.el#L661 |
|
|
|
|
|
|
|
|
|
|
|
;; Evil command history selection |
|
|
|
;; Evil command history selection |
|
|
|
(with-eval-after-load 'evil-ex |
|
|
|
(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-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-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)) |
|
|
|
|
|
|
|
|
|
|
|
; Overwrite evil keymaps |
|
|
|
; Overwrite evil keymaps |
|
|
|
;(evil-global-set-key 'motion (kbd "C-w") 'kill-this-buffer) |
|
|
|
;(evil-global-set-key 'motion (kbd "C-w") 'kill-this-buffer) |
|
|
|
;(evil-define-key 'motion 'global (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 |
|
|
|
;(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 |
|
|
|
;https://github.com/noctuid/evil-guide#global-keybindings-and-evil-states |
|
|
|
|
|
|
|
|
|
|
|
(with-eval-after-load 'evil-states |
|
|
|
(with-eval-after-load 'evil-states |
|
|
|
(general-define-key |
|
|
|
(general-define-key |
|
|
|
:keymaps 'evil-normal-state-map |
|
|
|
:keymaps 'evil-normal-state-map |
|
|
|
|
|
|
|
|
|
|
|
;; Neotree |
|
|
|
;; Neotree |
|
|
|
"C-n" 'neotree-toggle-in-project-root) |
|
|
|
"C-n" 'neotree-toggle-in-project-root) |
|
|
|
|
|
|
|
|
|
|
|
(general-define-key |
|
|
|
(general-define-key |
|
|
|
:states 'normal |
|
|
|
:states 'normal |
|
|
|
:keymaps 'neotree-mode-map |
|
|
|
:keymaps 'neotree-mode-map |
|
|
|
"RET" 'neotree-enter |
|
|
|
"RET" 'neotree-enter |
|
|
|
"<backtab>" 'neotree-collapse-all ; <S-tab> |
|
|
|
"<backtab>" 'neotree-collapse-all ; <S-tab> |
|
|
|
"c" 'neotree-create-node |
|
|
|
"c" 'neotree-create-node |
|
|
|
"r" 'neotree-rename-node |
|
|
|
"r" 'neotree-rename-node |
|
|
|
"d" 'neotree-delete-node |
|
|
|
"d" 'neotree-delete-node |
|
|
|
"h" 'neotree-select-previous-sibling-node |
|
|
|
"h" 'neotree-select-previous-sibling-node |
|
|
|
"j" 'neotree-next-line |
|
|
|
"j" 'neotree-next-line |
|
|
|
"k" 'neotree-previous-line |
|
|
|
"k" 'neotree-previous-line |
|
|
|
"l" 'neotree-enter |
|
|
|
"l" 'neotree-enter |
|
|
|
"R" 'neotree-refresh |
|
|
|
"R" 'neotree-refresh |
|
|
|
"C" 'neotree-change-root |
|
|
|
"C" 'neotree-change-root |
|
|
|
"H" 'neotree-hidden-file-toggle |
|
|
|
"H" 'neotree-hidden-file-toggle |
|
|
|
"q" 'neotree-hide |
|
|
|
"q" 'neotree-hide |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
;; Dashboard |
|
|
|
;; Dashboard |
|
|
|
(general-define-key |
|
|
|
(general-define-key |
|
|
|
:states 'normal |
|
|
|
:states 'normal |
|
|
|
:keymaps 'dashboard-mode-map |
|
|
|
:keymaps 'dashboard-mode-map |
|
|
|
[down-mouse-1] 'widget-button-click |
|
|
|
[down-mouse-1] 'widget-button-click |
|
|
|
"g" 'dashboard-refresh-buffer |
|
|
|
"g" 'dashboard-refresh-buffer |
|
|
|
"m" 'dashboard-goto-bookmarks |
|
|
|
"m" 'dashboard-goto-bookmarks |
|
|
|
"p" 'dashboard-goto-projects |
|
|
|
"p" 'dashboard-goto-projects |
|
|
|
"r" 'dashboard-goto-recent-files |
|
|
|
"r" 'dashboard-goto-recent-files |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
;; Elfeed |
|
|
|
;; Elfeed |
|
|
|
(general-define-key |
|
|
|
(general-define-key |
|
|
|
:states 'normal |
|
|
|
:states 'normal |
|
|
|
:keymaps 'elfeed-search-mode-map |
|
|
|
:keymaps 'elfeed-search-mode-map |
|
|
|
"gr" 'elfeed-search-update--force |
|
|
|
"b" 'elfeed-search-browse-url |
|
|
|
"gR" 'elfeed-search-fetch |
|
|
|
"c" 'elfeed-search-clear-filter |
|
|
|
"q" 'kill-this-buffer |
|
|
|
"gr" 'elfeed-search-update--force |
|
|
|
) |
|
|
|
"gR" 'elfeed-search-fetch |
|
|
|
|
|
|
|
"q" 'kill-this-buffer |
|
|
|
(general-define-key |
|
|
|
"u" 'elfeed-search-tag-all-unread |
|
|
|
:states 'normal |
|
|
|
"U" nil |
|
|
|
:keymaps 'elfeed-show-mode-map |
|
|
|
"r" 'elfeed-search-untag-all-unread |
|
|
|
"g" 'elfeed-show-refresh |
|
|
|
) |
|
|
|
"q" 'kill-this-buffer |
|
|
|
|
|
|
|
)) |
|
|
|
(general-define-key |
|
|
|
|
|
|
|
:states 'normal |
|
|
|
|
|
|
|
:keymaps 'elfeed-show-mode-map |
|
|
|
|
|
|
|
"b" #'elfeed-show-visit |
|
|
|
|
|
|
|
"g" 'elfeed-show-refresh |
|
|
|
|
|
|
|
"q" 'kill-this-buffer |
|
|
|
|
|
|
|
"u" #'elfeed-show-tag--unread |
|
|
|
|
|
|
|
"y" #'elfeed-show-yank |
|
|
|
|
|
|
|
)) |
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** Leader |
|
|
|
** Leader |
|
|
|