Skip to content

Rectangle Operations

zhaojiangbin edited this page Feb 24, 2015 · 12 revisions
(bind-key
 "C-x SPC"
 (defhydra rectangle-operations (:body-pre (rectangle-mark-mode))
   "
  rectangle operations

  arrow keys: extend region

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

"
   ("<left>"   backward-char nil :foreign-keys run)
   ("<right>"  forward-char  nil :foreign-keys run)
   ("<up>"     previous-line nil :foreign-keys run)
   ("<down>"   next-line     nil :foreign-keys run)
   ("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