added a working align-to-equals helper function and keybindings

This commit is contained in:
2012-02-10 17:46:01 +00:00
parent ab0ec32a8f
commit 0ef4492711
2 changed files with 8 additions and 3 deletions

View File

@@ -42,9 +42,10 @@
;; Align Equal Signs
;;
;; (defun align-equal-signs()
;; (interactive)
;; (align-regexp "="))
(defun align-to-equals (begin end)
"Align region to equal signs"
(interactive "r")
(align-regexp begin end "\\(\\s-*\\)=" 1 1 ))
;;

View File

@@ -59,6 +59,10 @@
;; Duplicate line (via helpers.el)
(global-set-key (kbd "C-x C-d") 'duplicate-line)
;; Align to equal signs
(global-set-key (kbd "C-x a =") 'align-to-equals)
(global-set-key (kbd "M-s-") 'align-to-equals)
;; Goto line
(global-set-key (kbd "C-c C-l") 'goto-line)