diff options
| author | Blake Romero <blake@blkrom.com> | 2025-07-10 10:14:34 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-07-10 10:18:44 +0100 |
| commit | ba293be02163b916581eb3530863125fa781e6d9 (patch) | |
| tree | 7a5a3b5c1670524ab2a522bd134558c651ffaa40 | |
| parent | f51b29743f0e7fc4026e106f0bc250e66bdadc88 (diff) | |
Add advice to cut line or region from cursor point
| -rw-r--r-- | emacs-config.org | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs-config.org b/emacs-config.org index 86793b8..c067c52 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -56,6 +56,16 @@ Add advice to copy line at cursor point or region. (line-beginning-position 2))))) #+end_src +Add advice to cut line or region at cursor point. +#+begin_src elisp + (defadvice kill-region (before dwim-cut activate compile) + "Cut the current line at point or region." + (interactive + (if mark-active (list (region-beginning) (region-end)) + (list (line-beginning-position) + (line-beginning-position 2))))) +#+end_src + ** Editor Tab behaviour settings. #+begin_src elisp |
