aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2024-10-27 17:07:04 -0700
committerRaúl Benencia <id@rbenencia.name>2024-10-27 17:07:04 -0700
commit80936a2ca09153463ef4ea9c3a976d87679f55b9 (patch)
treec6617f29b56779e677dca25f8039821a801210f8
parentb596fca706bff857447568c2e99ce08eb5f44174 (diff)
emacs: mv hydra.el and global bindings to package rul-bindings
-rw-r--r--.emacs.d/init.el13
-rw-r--r--.emacs.d/rul-emacs.org16
-rw-r--r--.emacs.d/rul-init.d/fonts.el30
-rw-r--r--.emacs.d/rul-lisp/packages/rul-bindings.el (renamed from .emacs.d/rul-init.d/hydra.el)15
4 files changed, 15 insertions, 59 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index d595255..f4aaa45 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -18,17 +18,6 @@
;; Do not persist customizations
(setq custom-file (make-temp-file "emacs-custom-"))
-;; Global keybindings
-(global-set-key (kbd "C-c R") 'revert-buffer)
-(global-set-key (kbd "C-c w") 'whitespace-cleanup)
-
-(defun help/insert-em-dash ()
- "Inserts an EM-DASH (not a HYPEN, not an N-DASH)"
- (interactive)
- (insert "—"))
-
-(global-set-key (kbd "C--") #'help/insert-em-dash)
-
(setq fill-column 79) ; Wrap lines
(setq mouse-yank-at-point t) ; Do not follow mouse curors when mouse-yanking
@@ -70,6 +59,7 @@
(dolist (path '("~/.emacs.d/rul-lisp/config" "~/.emacs.d/rul-lisp/packages"))
(add-to-list 'load-path path))
+(require 'rul-bindings)
(require 'rul-completion)
(require 'rul-fm)
(require 'rul-fonts)
@@ -83,7 +73,6 @@
(require 'rul-write)
;; Init parts (will be deprecated in favor of packages)
-(load-file "~/.emacs.d/rul-init.d/hydra.el")
(load-file "~/.emacs.d/rul-init.d/ibuffer.el")
(load-file "~/.emacs.d/rul-init.d/imenu.el")
(load-file "~/.emacs.d/rul-init.d/magit.el")
diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org
index 9e5fec4..186aace 100644
--- a/.emacs.d/rul-emacs.org
+++ b/.emacs.d/rul-emacs.org
@@ -119,21 +119,7 @@ Configurations that need persisting will be added to =custom-set-variables= and
;; Do not persist customizations
(setq custom-file (make-temp-file "emacs-custom-"))
#+end_src
-** Global keybindings
-This section defines keybindings common across all modes.
-#+begin_src emacs-lisp :tangle "init.el"
-;; Global keybindings
-(global-set-key (kbd "C-c R") 'revert-buffer)
-(global-set-key (kbd "C-c w") 'whitespace-cleanup)
-
-(defun help/insert-em-dash ()
- "Inserts an EM-DASH (not a HYPEN, not an N-DASH)"
- (interactive)
- (insert "—"))
-
-(global-set-key (kbd "C--") #'help/insert-em-dash)
-#+end_src
** Editor interface
General configurations related to text editing across all modes.
@@ -189,6 +175,7 @@ Now, I simply start it from Emacs itself. This approach works well for me.
(dolist (path '("~/.emacs.d/rul-lisp/config" "~/.emacs.d/rul-lisp/packages"))
(add-to-list 'load-path path))
+(require 'rul-bindings)
(require 'rul-completion)
(require 'rul-fm)
(require 'rul-fonts)
@@ -202,7 +189,6 @@ Now, I simply start it from Emacs itself. This approach works well for me.
(require 'rul-write)
;; Init parts (will be deprecated in favor of packages)
-(load-file "~/.emacs.d/rul-init.d/hydra.el")
(load-file "~/.emacs.d/rul-init.d/ibuffer.el")
(load-file "~/.emacs.d/rul-init.d/imenu.el")
(load-file "~/.emacs.d/rul-init.d/magit.el")
diff --git a/.emacs.d/rul-init.d/fonts.el b/.emacs.d/rul-init.d/fonts.el
deleted file mode 100644
index a7cb255..0000000
--- a/.emacs.d/rul-init.d/fonts.el
+++ /dev/null
@@ -1,30 +0,0 @@
-(use-package fontaine
- :ensure t
- :config
- (setq fontaine-presets
- '((tiny
- :default-height 100)
- (small
- :default-height 120)
- (medium
- :default-height 140)
- (large
- :default-weight semilight
- :default-height 180
- :bold-weight extrabold)
- (presentation
- :default-weight semilight
- :default-height 200
- :bold-weight extrabold)
- (jumbo
- :default-weight semilight
- :default-height 230
- :bold-weight extrabold)
- (t
- :default-family "Iosevka"
- :default-weight regular
- :default-height 140
- :variable-pitch-family "Iosevka Aile")))
-
- ;; Set desired style from `fontaine-presets'
- (fontaine-set-preset 'medium))
diff --git a/.emacs.d/rul-init.d/hydra.el b/.emacs.d/rul-lisp/packages/rul-bindings.el
index 525162e..f337ee0 100644
--- a/.emacs.d/rul-init.d/hydra.el
+++ b/.emacs.d/rul-lisp/packages/rul-bindings.el
@@ -1,3 +1,14 @@
+;; Global keybindings
+(global-set-key (kbd "C-c R") 'revert-buffer)
+(global-set-key (kbd "C-c w") 'whitespace-cleanup)
+
+(defun help/insert-em-dash ()
+ "Inserts an EM-DASH (not a HYPEN, not an N-DASH)"
+ (interactive)
+ (insert "—"))
+
+(global-set-key (kbd "C--") #'help/insert-em-dash)
+
(use-package hydra
:ensure t
:defer 1)
@@ -43,6 +54,6 @@
)
(global-set-key (kbd "C-c t") 'hydra-vterm/body)
-
-
(global-set-key (kbd "C-c m") 'hydra-go/body)
+
+(provide 'rul-bindings)
nihil fit ex nihilo