mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Add a keybinding for aligning lines to "{"
This commit is contained in:
@@ -60,6 +60,11 @@ there's a region, all lines that region covers will be duplicated."
|
||||
(interactive "r")
|
||||
(align-regexp begin end "\\(\\s-*\\)=" 1 1 ))
|
||||
|
||||
(defun align-region-to-opening-brace (begin end)
|
||||
"Align region to equal signs"
|
||||
(interactive "r")
|
||||
(align-regexp begin end "\\(\\s-*\\){" 1 1 ))
|
||||
|
||||
|
||||
;;
|
||||
;; Yank Pop Forwards
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
;; Align to equal signs (via helpers.el).
|
||||
(global-set-key (kbd "C-x a =") 'align-region-to-equals)
|
||||
(global-set-key (kbd "M-]") 'align-region-to-equals)
|
||||
(global-set-key (kbd "C-x a {") 'align-region-to-opening-brace)
|
||||
(global-set-key (kbd "M-[") 'align-region-to-opening-brace)
|
||||
|
||||
;; align-regexp
|
||||
(global-set-key (kbd "C-c \\") 'align-regexp)
|
||||
|
||||
Reference in New Issue
Block a user