diff options
| author | tslil clingman <tslil@posteo.de> | 2024-07-08 10:25:18 +0200 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2024-07-08 10:28:29 +0200 |
| commit | 2d366c23976bf8735fd192c0c716f2c4821b718a (patch) | |
| tree | ecc2aac3460a4bfae46d461a9cfc19508e0f3848 /emacs/inits/70-global-keybinds.el | |
| parent | dee97a1838e82772abe745b18772e5d58ff1884a (diff) | |
[emacs] cleanup
Diffstat (limited to 'emacs/inits/70-global-keybinds.el')
| -rw-r--r-- | emacs/inits/70-global-keybinds.el | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/emacs/inits/70-global-keybinds.el b/emacs/inits/70-global-keybinds.el index 1e3657e..045e62f 100644 --- a/emacs/inits/70-global-keybinds.el +++ b/emacs/inits/70-global-keybinds.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2023-08-29 09h09 CEST (anker)> +;; Time-stamp: <2024-07-08 10h27 CEST (anker)> (setq time-stamp-active t time-stamp-line-limit 3 @@ -20,6 +20,7 @@ (insert (concat "Time-stamp: " "<>")) (newline)) (time-stamp))) + (global-set-key (kbd "C-x t") 'insert-timestamp) (global-set-key (kbd "C-z") 'nil) @@ -34,14 +35,34 @@ (global-set-key (kbd "M-i") 'indent-region) -(global-set-key (kbd "C-v") 'delete-indentation) - ;; ----------------------------------------------------------------------------- ;; Killing + (global-set-key (kbd "C-c C-k") 'kill-whole-line) (global-set-key (kbd "M-z") 'zap-up-to-char) -(defun kill-region-or-backward-kill-word (arg) +(defun better-backward-kill-word (arg) (interactive "p") (if (region-active-p) (kill-region 0 0 t) (backward-kill-word arg))) + +(global-set-key (kdb "M-h") 'better-backward-kill-word) +(global-set-key (kbd "M-<Backspace>") 'better-backward-kill-word) + +;; ----------------------------------------------------------------------------- +;; Line entry + +(defun vi-open-line-below () + "Insert a newline below the current line and put point at beginning." + (interactive) + (unless (eolp) + (end-of-line)) + (newline-and-indent)) + +(global-set-key (kbd "M-o") 'vi-open-line-below) + +;; ----------------------------------------------------------------------------- +;; Zoom! Enhance! + +(global-set-key (kbd "M-C-+") 'text-scale-increase) +(global-set-key (kbd "M-C--") 'text-scale-decrease) |
