Browse Source

Improve tab navigation

master
Riyyi 4 years ago
parent
commit
f3841ba942
  1. 49
      .emacs.d/config.org

49
.emacs.d/config.org

@ -146,7 +146,7 @@ Install and configure packages.
:after evil
:custom
(evil-collection-company-use-tng nil)
(evil-collection-key-blacklist '("M-h" "M-l" "SPC"))
(evil-collection-key-blacklist '("M-h" "M-j" "M-k" "M-l" "SPC"))
(evil-collection-setup-minibuffer t)
:config (evil-collection-init))
@ -428,7 +428,7 @@ https://github.com/laishulu/hl-fill-column
#+BEGIN_SRC emacs-lisp
(use-package elfeed
:custom
(elfeed-db-directory "~/.emacs.d/elfeed/")
(elfeed-db-directory (concat emacs-d "/elfeed"))
(elfeed-enclosure-default-dir "~/downloads/")
(elfeed-search-filter "@6-months-ago +unread")
(elfeed-search-clipboard-type 'CLIPBOARD)
@ -877,6 +877,8 @@ Disable spacebar in evil motion.
#+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 "C-M-h") 'centaur-tabs-move-current-tab-to-left)
(global-set-key (kbd "C-M-l") 'centaur-tabs-move-current-tab-to-right)
@ -1027,11 +1029,8 @@ General.el ~leader key binds.
"f r" '(rename-file-and-buffer :which-key "Rename file")
"f s" '(basic-save-buffer :which-key "Save file")
;; Tabs
"h" '(centaur-tabs-backward-group :which-key "Tab backward group")
"j" '(centaur-tabs-select-end-tab :which-key "Tab select first")
"k" '(centaur-tabs-select-beg-tab :which-key "Tab select last")
"l" '(centaur-tabs-forward-group :which-key "Tab forward group")
;; Help
"h" '(help-command :which-key "help")
;; Insert
"i" '(:ignore t :which-key "insert")
@ -1063,6 +1062,10 @@ General.el ~leader key binds.
"t" '(:ignore t :which-key "tabs")
"t b" '(centaur-tabs-group-buffer-groups :which-key "Group tabs by buffer")
"t p" '(centaur-tabs-group-by-projectile-project :which-key "Group tabs by project")
"t h" '(centaur-tabs-backward-group :which-key "Tab backward group")
"t j" '(centaur-tabs-select-end-tab :which-key "Tab select first")
"t k" '(centaur-tabs-select-beg-tab :which-key "Tab select last")
"t l" '(centaur-tabs-forward-group :which-key "Tab forward group")
;; Update packages
"u" '(auto-package-update-now :which-key "Update packages")
@ -1098,20 +1101,38 @@ https://github.com/suyashbire1/emacs.d/blob/master/init.el
*** Major mode
#+BEGIN_SRC emacs-lisp
(general-create-definer comma-leader
:prefix "SPC ,"
:states '(normal visual))
(general-create-definer local-leader
:prefix "SPC m"
:non-normal-prefix "M-SPC m"
:global-prefix "M-SPC m"
:states '(normal visual insert motion emacs)
)
(which-key-add-key-based-replacements "SPC m" "<local leader>")
(which-key-add-key-based-replacements "M-SPC m" "<local leader>")
(local-leader org-mode-map
"'" '(org-edit-special :which-key "Org edit")
)
(comma-leader elfeed-search-mode-map
"" '(:ignore t :which-key "elfeed")
(local-leader org-src-mode-map
"'" '(org-edit-src-exit :which-key "Org exit edit")
"k" '(org-edit-src-abort :which-key "Org abort edit")
)
(define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit)
(local-leader elfeed-search-mode-map
"g" 'elfeed-search-update--force
"G" 'elfeed-search-fetch
)
(comma-leader elfeed-show-mode-map
"" '(:ignore t :which-key "elfeed")
(local-leader elfeed-show-mode-map
"g" 'elfeed-show-refresh
)
;; c-fill-paragraph Reflow comment
;; https://youtu.be/hbmV1bnQ-i0?t=1910
#+END_SRC
* Notes

Loading…
Cancel
Save