往左快速删除操作

如何实现通过快捷键删除,方向为光标左方,保留左边的缩进。

(global-set-key (kbd "C-<backspace>") (lambda ()
                                        (interactive)
                                        (kill-line 0)
                                        (indent-according-to-mode)))
1 个赞

aggressive-indent应该可以满足。建议再搭配上hungry-delete.

1 个赞

M-m C-k

=> back-to-indentation + kill-line

evil-mode: d^