This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/my-macros.el

33 lines
1.4 KiB
EmacsLisp

;; Works only with selections from top to bottom
(fset 'mac-mc-edit-beginnings-of-lines-tb
(lambda (&optional arg)
"Edit beginnings of lines using mulitple cursors with Evil."
(interactive "p")
(kmacro-exec-ring-item (quote ("k\215bi" 0 "%d")) arg)))
;; Works only with selections from top to bottom
(fset 'mac-mc-edit-ends-of-lines-tb
(lambda (&optional arg)
"Edit ends of lines using mulitple cursors with Evil."
(interactive "p")
(kmacro-exec-ring-item (quote ("k\215ei" 0 "%d")) arg)))
;; Works only with selections from bottom to top
(fset 'mac-mc-edit-beginnings-of-lines-bt
(lambda (&optional arg)
"Edit beginnings of lines using mulitple cursors with Evil."
(interactive "p")
(kmacro-exec-ring-item (quote ("\215bi" 0 "%d")) arg)))
;; Works only with selections from bottom to top
(fset 'mac-mc-edit-ends-of-lines-bt
(lambda (&optional arg)
"Edit ends of lines using mulitple cursors with Evil."
(interactive "p")
(kmacro-exec-ring-item (quote ("\215ei" 0 "%d")) arg)))
;; Acquire cursors at the beginning of all selected regions
(fset 'mac-mc-acquire-cursors-at-beginning
(lambda (&optional arg)
"Transform a multiple selection into cursors at the beginning of each selection."
(interactive "p")
(kmacro-exec-ring-item (quote ([73 105 escape 104 120] 0 "%d")) arg)))
(provide 'my-macros)