Skip to content

Rectangle Operations

Oleh Krehel edited this page Feb 24, 2015 · 12 revisions
(bind-key
 "C-x SPC"
 (defhydra rectangle-operations (:body-pre (rectangle-mark-mode 1)
                                 :foreign-keys run
                                 :post (deactivate-mark))
   "
  rectangle operations

  arrow keys: extend region

  f:          fill (replace) with input string
  a:          align by input regexp

"
   ("<left>"   backward-char nil)
   ("<right>"  forward-char  nil)
   ("<up>"     previous-line nil)
   ("<down>"   next-line     nil)
   ("SPC"      rectangle-mark-mode    "mark")
   ("d"        kill-rectangle         "delete")
   ("c"        copy-rectangle-as-kill "copy")
   ("y"        yank-rectangle         "yank")
   ("f"        string-rectangle       "fill")
   ("s"        open-rectangle         "shift")
   ("a"        align-regexp           "align")
   ("C-/"      undo                   "undo")
   ("<escape>" nil)))
Clone this wiki locally