1
0
Fork 0

[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.
main
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)))
(map! :leader
(:prefix-map ("l" . "org-stuff")
: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
(:prefix-map ("l" . "bascht/personal")
: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
)
(:prefix "m"
:desc "Capture" "m" #'org-capture
(:prefix "i"
:desc "Insert link" "l" #'org-insert-link
:desc "Insert structure template" "s" #'org-insert-structure-template)
(:prefix "g"
:desc "Open Knowledgebase" "k" (lambda () (interactive) (find-file "~/Documents/Zettelkasten/KnowledgeBase.org")))
(:prefix "c"
:desc "Clock in alfatraining" "a" #'bascht/alfatraining-clock-in
:desc "Clock in most recent item" "r" #'org-mru-clock-in
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines))
(:prefix "o"
:desc "Treemacs" "t" #'+treemacs/toggle
:desc "Capture" "p" #'+vterm/toggle)
:desc "" "oc" #'org-capture
(:prefix "c"
:desc "Toggle comment" "l" #'evilnc-comment-or-uncomment-lines
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines)
:desc "" "oc" #'org-capture
:desc "" "oo" #'counsel-org-agenda-headlines
:desc "" "rl" #'org-refile-goto-last-stored
:desc "" "jt" #'org-journal-new-entry
:desc "" "jy" #'bascht/goto-yesterdays-journal
:desc "" "glu" #'mu4e-view-go-to-url
:desc "" "drr" #'rake
:desc "" "drl" #'rake-rerun
)
(:prefix-map ("c" . "clocks")
:desc "Clock in alfatraining" "a" #'bascht/alfatraining-clock-in))
(:prefix-map ("nw" . "WirZwei Zettelkasten")
:desc "Open todays wzzk" "t" #'bascht/wzzk-find-today
:desc "Open yesterdays wzzk" "y" #'bascht/wzzk-find-yesterday
:desc "Find file in wzzk" "f" #'bascht/wzzk-find)
:desc "Open yesterdays yournal" "njy" #'bascht/goto-yesterdays-journal
:desc "Find in Knowledgebase" "ngk" (lambda () (interactive) (bascht/org-file-show-headings "~/Documents/Zettelkasten/KnowledgeBase.org"))
:desc "Treemacs alternative" "ot" #'+treemacs/toggle
:desc "Vterm alternative" "op" #'+vterm/toggle)
(map! :after org
:map org-mode-map
:localleader
:desc "Insert structure template" "i" #'org-insert-structure-template) ; I *never* use org-toggle-item)
(map!
:after markdown-mode
:map evil-markdown-mode-map
:n [return] #'bascht/markdown-do)
; Define quick helper switches to switch between languages while
; keeping distinct personal dictionaries for both of them
@ -166,11 +154,6 @@
(t
(markdown-do))))
(map!
:after markdown-mode
:map evil-markdown-mode-map
:n [return] #'bascht/markdown-do)
(after! markdown-mode
(setq markdown-enable-wiki-links t
markdown-wiki-link-search-type '(sub-directories parent-directories)