[emacs] Finally clean up that keybinding mess I cobbled together

Those keybindings were carried over from my old Vim / VimOrganizer times
to Spacemacs and then later to doom Emacs. Go figure.

This finally cleans up the key sequences, so they no longer overlap with
the core bindings (which made a good chunk of them obsolete):

Also this change now makes use of the `:after` and `:map` arguments to
only ever map those keys if we're in the major mode.
This commit is contained in:
Sebastian Schulze 2022-02-15 22:34:51 +01:00
parent cbe86f35a0
commit ef1486a5f8
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 24 additions and 41 deletions

View File

@ -66,44 +66,32 @@
'face 'doom-dashboard-banner))) 'face 'doom-dashboard-banner)))
(map! :leader (map! :leader
(:prefix-map ("l" . "org-stuff") (:prefix-map ("l" . "bascht/personal")
:desc "My Agenda" "a" #'bascht/org-agenda
:desc "My Inbox" "i" #'bascht/mu4e-inbox
:desc "Cycle all agenda files" "o" #'counsel-org-agenda-headlines
:desc "Go to current clock" "k" #'org-clock-goto
:desc "Start my daily review" "d" #'bascht/daily-review :desc "Start my daily review" "d" #'bascht/daily-review
:desc "Jump to org file" "g" #'bascht/go-to-org-file
:desc "" "td" (lambda () (interactive) (load-theme 'doom-one nil t))
:desc "" "tl" (lambda () (interactive) (load-theme 'doom-one-light nil t))
:desc "Run table formatter" "tf" #'org-table-calc-current-TBLFM :desc "Run table formatter" "tf" #'org-table-calc-current-TBLFM
)
(:prefix "m" (:prefix-map ("c" . "clocks")
:desc "Capture" "m" #'org-capture :desc "Clock in alfatraining" "a" #'bascht/alfatraining-clock-in))
(:prefix "i"
:desc "Insert link" "l" #'org-insert-link (:prefix-map ("nw" . "WirZwei Zettelkasten")
:desc "Insert structure template" "s" #'org-insert-structure-template) :desc "Open todays wzzk" "t" #'bascht/wzzk-find-today
(:prefix "g" :desc "Open yesterdays wzzk" "y" #'bascht/wzzk-find-yesterday
:desc "Open Knowledgebase" "k" (lambda () (interactive) (find-file "~/Documents/Zettelkasten/KnowledgeBase.org"))) :desc "Find file in wzzk" "f" #'bascht/wzzk-find)
(:prefix "c"
:desc "Clock in alfatraining" "a" #'bascht/alfatraining-clock-in :desc "Open yesterdays yournal" "njy" #'bascht/goto-yesterdays-journal
:desc "Clock in most recent item" "r" #'org-mru-clock-in :desc "Find in Knowledgebase" "ngk" (lambda () (interactive) (bascht/org-file-show-headings "~/Documents/Zettelkasten/KnowledgeBase.org"))
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines)) :desc "Treemacs alternative" "ot" #'+treemacs/toggle
(:prefix "o" :desc "Vterm alternative" "op" #'+vterm/toggle)
:desc "Treemacs" "t" #'+treemacs/toggle
:desc "Capture" "p" #'+vterm/toggle) (map! :after org
:desc "" "oc" #'org-capture :map org-mode-map
(:prefix "c" :localleader
:desc "Toggle comment" "l" #'evilnc-comment-or-uncomment-lines :desc "Insert structure template" "i" #'org-insert-structure-template) ; I *never* use org-toggle-item)
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines)
:desc "" "oc" #'org-capture (map!
:desc "" "oo" #'counsel-org-agenda-headlines :after markdown-mode
:desc "" "rl" #'org-refile-goto-last-stored :map evil-markdown-mode-map
:desc "" "jt" #'org-journal-new-entry :n [return] #'bascht/markdown-do)
:desc "" "jy" #'bascht/goto-yesterdays-journal
:desc "" "glu" #'mu4e-view-go-to-url
:desc "" "drr" #'rake
:desc "" "drl" #'rake-rerun
)
; Define quick helper switches to switch between languages while ; Define quick helper switches to switch between languages while
; keeping distinct personal dictionaries for both of them ; keeping distinct personal dictionaries for both of them
@ -166,11 +154,6 @@
(t (t
(markdown-do)))) (markdown-do))))
(map!
:after markdown-mode
:map evil-markdown-mode-map
:n [return] #'bascht/markdown-do)
(after! markdown-mode (after! markdown-mode
(setq markdown-enable-wiki-links t (setq markdown-enable-wiki-links t
markdown-wiki-link-search-type '(sub-directories parent-directories) markdown-wiki-link-search-type '(sub-directories parent-directories)