aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r--Emacs/.config/emacs/config.org33
1 files changed, 22 insertions, 11 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index c0c37fa..5ab8f6d 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -237,6 +237,17 @@ to use the keyword.
(display-buffer-at-bottom)
(window-height . 0.25)))
#+end_src
+** add-to-list multiple times
+I want to be able to add multiple items to a list. Here's a macro to
+do that for me.
+
+#+begin_src emacs-lisp
+(defmacro add-multiple-to-list (listvar &rest elements)
+ (cons
+ 'progn
+ (cl-loop for element in elements
+ collect `(cl-pushnew ,element ,listvar))))
+#+end_src
* Aesthetics
General look and feel of Emacs (mostly disabling stuff I don't like).
** Themes
@@ -661,6 +672,7 @@ Setup the evil package, with some opinionated keybindings:
(setq evil-want-keybinding nil
evil-split-window-below t
evil-vsplit-window-right t
+ evil-move-beyond-eol t
evil-want-abbrev-expand-on-insert-exit t
evil-undo-system #'undo-tree)
:config
@@ -1086,10 +1098,10 @@ use-package declarations.
:hydra
(hydra-window-resize
nil "Resize the current window effectively"
- (">" #'evil-window-increase-width)
- ("<" #'evil-window-decrease-width)
- ("-" #'evil-window-decrease-height)
- ("+" #'evil-window-increase-height)
+ ("l" #'evil-window-increase-width)
+ ("h" #'evil-window-decrease-width)
+ ("j" #'evil-window-decrease-height)
+ ("k" #'evil-window-increase-height)
("=" #'balance-windows))
:general
(leader
@@ -2411,12 +2423,9 @@ description I give won't do it justice.
:straight t
:demand t
:config
- (add-to-list 'aggressive-indent-excluded-modes
- 'c-mode)
- (add-to-list 'aggressive-indent-excluded-modes
- 'c++-mode)
- (add-to-list 'aggressive-indent-excluded-modes
- 'cc-mode)
+ (add-multiple-to-list aggressive-indent-excluded-modes
+ 'c-mode 'c++-mode 'cc-mode
+ 'asm-mode)
(global-aggressive-indent-mode))
#+end_src
** Compilation
@@ -3150,7 +3159,9 @@ Tons of stuff, namely:
(:keymaps '(c-mode-map c++-mode-map)
:states '(normal motion visual)
"(" #'c-beginning-of-statement
- ")" #'c-end-of-statement)
+ ")" #'c-end-of-statement
+ "{" #'c-beginning-of-defun
+ "}" #'c-end-of-defun)
:init
(setq-default c-basic-offset 2)
(setq-default c-auto-newline nil)