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)."
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
"s-/" (λ! (save-excursion (comment-line 1)))
|
||||
:n "s-/" #'evilnc-comment-or-uncomment-lines
|
||||
:v "s-/" #'evilnc-comment-operator
|
||||
:gi [s-backspace] #'evil-delete-back-to-indentation
|
||||
:gi [s-backspace] #'doom/backward-kill-to-bol-and-indent
|
||||
:gi [s-left] #'doom/backward-to-bol-or-indent
|
||||
:gi [s-right] #'doom/forward-to-last-non-comment-or-eol
|
||||
:gi [M-backspace] #'backward-kill-word
|
||||
|
|
|
@ -149,6 +149,7 @@ You should use `set-eshell-alias!' to change this.")
|
|||
[remap split-window-below] #'+eshell/split-below
|
||||
[remap split-window-right] #'+eshell/split-right
|
||||
[remap doom/backward-to-bol-or-indent] #'eshell-bol
|
||||
[remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
|
||||
[remap evil-delete-back-to-indentation] #'eshell-kill-input
|
||||
[remap evil-window-split] #'+eshell/split-below
|
||||
[remap evil-window-vsplit] #'+eshell/split-right)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue