Fix s-backspace for non-evil users
This commit is contained in:
parent
d1becfce89
commit
b88ff2a563
3 changed files with 16 additions and 1 deletions
|
@ -129,6 +129,20 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'."
|
|||
(setq doom--last-forward-pt (point))
|
||||
(goto-char eol))))))
|
||||
|
||||
;;;###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. Same as `evil-delete-back-to-indentation'."
|
||||
(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/dumb-indent ()
|
||||
"Inserts a tab character (or spaces x tab-width)."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue