Skip to content

Commit 968f9d7

Browse files
authored
feat: optimize keybindings and reduce packages (#380)
* feat: add some more keybindings * feat: use lisp-interaction-mode for emacs-lisp org-src-block This avoids the lexical-binding check. * feat: remove some packages
1 parent 54d1b94 commit 968f9d7

File tree

3 files changed

+38
-171
lines changed

3 files changed

+38
-171
lines changed

init.org

+38-33
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Track how much time is spent in each function and present a view to investigate
251251

252252
*** vlf
253253
Large file support. This can view/edit/search and compare large files.
254-
#+begin_src emacs-lisp :tangle yes
254+
#+begin_src emacs-lisp :tangle no
255255
(use-package vlf :ensure t)
256256
#+end_src
257257

@@ -737,6 +737,7 @@ Shorten long Git branch names as well as replace Git prefix with a nice icon.
737737
(keymap-global-set "<Tools>" #'just-one-space)
738738
(keymap-global-set "M-p" #'completion-at-point)
739739
(keymap-global-set "C-M-y" #'duplicate-dwim)
740+
(keymap-global-set "C-x C-/" #'revert-buffer)
740741
(keymap-global-set "C-z" #'zap-up-to-char)
741742
(keymap-global-set "<remap> <upcase-word>" #'upcase-dwim)
742743
(keymap-global-set "<remap> <downcase-word>" #'downcase-dwim)
@@ -762,6 +763,11 @@ Shorten long Git branch names as well as replace Git prefix with a nice icon.
762763
("m" . maximize-window)
763764
("r" . window-configuration-to-register)
764765
("w" . window-toggle-side-windows))
766+
(:repeat-map buffer-repeat-map
767+
("b" . next-buffer)
768+
("B" . previous-buffer)
769+
("[" . previous-buffer)
770+
("]" . next-buffer))
765771
(:repeat-map other-window-repeat-map
766772
("o" . other-window)
767773
("O" . other-window-reverse-repeat)))
@@ -786,7 +792,6 @@ Shorten long Git branch names as well as replace Git prefix with a nice icon.
786792
(defvar-keymap next-map
787793
:doc "Keymap for the next key sequences."
788794
:prefix 'next-map-prefix
789-
"]" '("Text size" . text-scale-increase)
790795
"b" '("Buffer" . next-buffer)
791796
"c" '("Conflict" . smerge-next)
792797
"e" '("Error" . next-error))
@@ -795,7 +800,6 @@ Shorten long Git branch names as well as replace Git prefix with a nice icon.
795800
(defvar-keymap prev-map
796801
:doc "Keymap for the prev key sequences."
797802
:prefix 'prev-map-prefix
798-
"[" '("Text size" . text-scale-decrease)
799803
"b" '("Buffer" . previous-buffer)
800804
"c" '("Conflict" . smerge-prev)
801805
"e" '("Error" . previous-error))
@@ -1001,6 +1005,8 @@ Commands compatible with ~completing-read~.
10011005
(([remap bookmark-jump] . consult-bookmark)
10021006
([remap goto-line] . consult-goto-line)
10031007
([remap imenu] . consult-imenu)
1008+
([remap jump-to-register] . consult-register)
1009+
([remap point-to-register] . consult-register-store)
10041010
([remap switch-to-buffer] . consult-buffer)
10051011
([remap yank-pop] . consult-yank-pop)
10061012
("C-c k" . consult-kmacro)
@@ -1128,7 +1134,9 @@ Undo/redo between window layouts.
11281134
:bind
11291135
(:repeat-map winner-repeat-map
11301136
("[" . winner-undo)
1131-
("]" . winner-redo))
1137+
("]" . winner-redo)
1138+
("M-[" . winner-undo)
1139+
("M-]" . winner-redo))
11321140
:init
11331141
(setq winner-dont-bind-my-keys t)
11341142
(keymap-set next-map next-prefix '("Window History" . winner-redo))
@@ -1799,18 +1807,6 @@ Jump to ...
17991807
(:map goto-map ("C" . avy-goto-char-in-line)))
18001808
#+end_src
18011809

1802-
*** bibliothek
1803-
Management tool for a library of PDFs.
1804-
#+begin_src emacs-lisp :tangle yes
1805-
(use-package bibliothek
1806-
:ensure t
1807-
:bind
1808-
(:map leader-map ("b" . bibliothek))
1809-
:init
1810-
(setq bibliothek-path '("~/books" "~/documents/research/papers"))
1811-
(setq bibliothek-recursive t))
1812-
#+end_src
1813-
18141810
*** bookmark
18151811
Keep track of bookmarks
18161812
#+begin_src emacs-lisp :tangle yes
@@ -2373,15 +2369,6 @@ Enhanced git related views and commands.
23732369
(setenv "GIT_PAGER" ""))
23742370
#+end_src
23752371

2376-
*** vc-msg
2377-
Popup commit message for current line
2378-
#+begin_src emacs-lisp :tangle yes
2379-
(use-package vc-msg
2380-
:ensure t
2381-
:bind
2382-
(:map vc-prefix-map ("p" . vc-msg-show)))
2383-
#+end_src
2384-
23852372
** Packages
23862373
*** envrc
23872374
Project-specific environment variables via =direnv=.
@@ -2505,7 +2492,7 @@ Delete trailing white-space before save, but *only* for edited lines.
25052492
** Appearance
25062493
*** Highlight delimiters
25072494
Visually separate delimiter pairs.
2508-
#+begin_src emacs-lisp :tangle yes
2495+
#+begin_src emacs-lisp :tangle no
25092496
(use-package rainbow-delimiters
25102497
:ensure t
25112498
:hook
@@ -2520,7 +2507,7 @@ Visually separate delimiter pairs.
25202507

25212508
*** Highlight identifiers
25222509
Highlight source code identifiers based on their name.
2523-
#+begin_src emacs-lisp :tangle yes
2510+
#+begin_src emacs-lisp :tangle no
25242511
(use-package color-identifiers-mode :ensure t)
25252512
#+end_src
25262513

@@ -2549,10 +2536,10 @@ Highlight source code identifiers based on their name.
25492536
* Major modes
25502537
** emacs-lisp
25512538
#+begin_src emacs-lisp :tangle yes
2552-
(add-hook 'emacs-lisp-mode-hook #'flymake-mode)
2553-
(add-hook 'emacs-lisp-mode-hook #'outline-minor-mode)
2554-
25552539
(use-package elisp-mode
2540+
:hook
2541+
(emacs-lisp-mode-hook . flymake-mode)
2542+
(emacs-lisp-mode-hook . outline-minor-mode)
25562543
:bind
25572544
(:map emacs-lisp-mode-map
25582545
("C-. c" . emacs-lisp-byte-compile)
@@ -2672,7 +2659,10 @@ Improve readability of escape characters in regular expressions.
26722659
("@home" . ?h)
26732660
("laptop" . ?l)))
26742661

2675-
(setq org-imenu-depth 3))
2662+
(setq org-imenu-depth 3)
2663+
:config
2664+
(dolist (lang '("emacs-lisp" "elisp"))
2665+
(cl-pushnew (cons lang 'lisp-interaction) org-src-lang-modes :test #'equal)))
26762666

26772667
(use-package ob-plantuml
26782668
:init
@@ -4112,6 +4102,23 @@ I am trying to reduce the amount of custom keybindings, therefore I present a ta
41124102
** Tasks
41134103
*** TODO Improve bindings
41144104
- Group editing bindings under logical prefix
4105+
- Binding for
4106+
- org-store-link
4107+
- repeat map for window resize operations
4108+
- =C-x {=,= =C-x +=, maximize-window
4109+
- flip-frame/flop-frame/transpose-frame
4110+
- leader mnemonics? as a separate package, or is it too much work?
4111+
- (t)oggle
4112+
- (s)earch
4113+
- (f)ile
4114+
- (r)ecent
4115+
- (s)ave
4116+
- (b)uffer
4117+
- b - switch
4118+
- (k)ill
4119+
- (n)ext/(p)rev - repeat
4120+
- (r)evert
4121+
- (j)ump (bookmark)
41154122
*** TODO Split theme into several parts
41164123
- One theme to set big headers and such things
41174124
- One theme to highlight errors
@@ -4214,7 +4221,6 @@ I am trying to reduce the amount of custom keybindings, therefore I present a ta
42144221
- ws-butler (deprecate?)
42154222

42164223
**** Full
4217-
- bibliothek
42184224
- browse-at-remote
42194225
- cakecrumbs
42204226
- caml
@@ -4273,7 +4279,6 @@ I am trying to reduce the amount of custom keybindings, therefore I present a ta
42734279
- stripe-buffer
42744280
- tuareg
42754281
- valign
4276-
- vc-msg
42774282
- vlf
42784283
- vterm-toggle
42794284
- web-mode

lock/flake.lock

-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)