Delete indentations with backward-delete-char-untabify
roife opened this issue · 1 comments
roife commented
backward-delete-char-untabify
is a useful built-in command for deleting indentations quickly. Here's an example (setting (setq backward-delete-char-untabify-method 'hungry)
):
(use-package ialign
:straight t
:config
(defun ()
|...))
when I press backspace
, it changes to
(use-package ialign
:straight t
:config
(defun ()
|...))
It does not work with puni
. Since DEL
is bond with puni-backward-delete-char
, how can I delete indentations quickly?
AmaiKinono commented
Sorry for the late response.
A simple fix is:
(defun my-backspace ()
(interactive)
(if (looking-back (rx line-start (+ blank)))
(delete-region (line-beginning-position) (point))
(puni-backward-delete-char)))
then bind it to DEL
.