summaryrefslogtreecommitdiff
path: root/emacs/inits/70-global-keybinds.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/inits/70-global-keybinds.el')
-rw-r--r--emacs/inits/70-global-keybinds.el29
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)