feat: add align-repeat utility function for text alignment
This commit is contained in:
@@ -21,7 +21,19 @@
|
|||||||
(setq ebnf-mode-comment-char ?\;) ; Use ; for comments
|
(setq ebnf-mode-comment-char ?\;) ; Use ; for comments
|
||||||
(setq ebnf-mode-eop-char ?\.)) ; Use . for end of production
|
(setq ebnf-mode-eop-char ?\.)) ; Use . for end of production
|
||||||
|
|
||||||
|
;; Devicetree mode (ZMK keymap, .dts, .dtsi)
|
||||||
|
(use-package! dts-mode
|
||||||
|
:mode ("\\.keymap\\'" "\\.dts\\'" "\\.dtsi\\'"))
|
||||||
|
|
||||||
;; Justfile mode (psibi/justl.el)
|
;; Justfile mode (psibi/justl.el)
|
||||||
(use-package! justl
|
(use-package! justl
|
||||||
:config
|
:config
|
||||||
(map! :n "e" 'justl-exec-recipe))
|
(map! :n "e" 'justl-exec-recipe))
|
||||||
|
|
||||||
|
;; align-repeat: repeatedly align region by a given regexp/character
|
||||||
|
;; From EmacsWiki: https://www.emacswiki.org/emacs/AlignCommands
|
||||||
|
(defun align-repeat (start end regexp)
|
||||||
|
"Repeat alignment with respect to the given regular expression."
|
||||||
|
(interactive "r\nsAlign regexp: ")
|
||||||
|
(align-regexp start end
|
||||||
|
(concat "\\(\\s-*\\)" regexp) 1 1 t))
|
||||||
|
|||||||
Reference in New Issue
Block a user