Replace doom/backward-kill-to-bol-and-indent

WIth new evil-delete-back-to-indentation, with behaves exactly as C-u
does in vim.
This commit is contained in:
Henrik Lissner 2019-12-21 03:28:07 -05:00
parent a49c0b6691
commit c1879945fd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
6 changed files with 7 additions and 21 deletions

View file

@ -155,20 +155,6 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'."
tab-width
(- tab-width movement)))))))))
;;;###autoload
(defun doom/backward-kill-to-bol-and-indent ()
"Kill line to the first non-blank character. If invoked again
afterwards, kill line to beginning of line."
(interactive)
(let ((empty-line-p (save-excursion (beginning-of-line)
(looking-at-p "[ \t]*$"))))
(funcall (if (fboundp 'evil-delete)
#'evil-delete
#'delete-region)
(point-at-bol) (point))
(unless empty-line-p
(indent-according-to-mode))))
;;;###autoload
(defun doom/retab (arg &optional beg end)
"Converts tabs-to-spaces or spaces-to-tabs within BEG and END (defaults to