Add `+indent-rigidly'
This works line-wise if the region isn't active.
This commit is contained in:
parent
8360e66d11
commit
4e562b202c
1
init.el
1
init.el
|
@ -42,6 +42,7 @@
|
|||
"C-w" #'+kill-word-backward-or-region
|
||||
"C-x C-m" #'execute-extended-command ; original: coding systems
|
||||
"C-<backspace>" #'+backward-kill-word
|
||||
"C-x TAB" #'+indent-rigidly
|
||||
;; Alright, Yegge... NOPE! C-x t is tab prefix ... (maybe F6 or something?)
|
||||
;; "C-x t" #'beginning-of-buffer
|
||||
;; "C-x e" #'end-of-buffer
|
||||
|
|
10
lisp/acdw.el
10
lisp/acdw.el
|
@ -417,5 +417,15 @@ NOMODE will be set when called with \\[universal-argument]."
|
|||
(when paste (insert paste))
|
||||
(get-buffer bufname)))
|
||||
|
||||
(defun +indent-rigidly (arg &optional interactive)
|
||||
"Indent all lines in the region, or the current line.
|
||||
This calls `indent-rigidly' and passes ARG to it."
|
||||
(interactive "P\np")
|
||||
(unless (region-active-p)
|
||||
(push-mark)
|
||||
(push-mark (line-beginning-position) nil t)
|
||||
(goto-char (line-end-position)))
|
||||
(call-interactively #'indent-rigidly))
|
||||
|
||||
(provide 'acdw)
|
||||
;;; acdw.el ends here
|
||||
|
|
Loading…
Reference in New Issue