diff options
Diffstat (limited to 'emacs/inits')
| -rw-r--r-- | emacs/inits/14-movement.el | 78 |
1 files changed, 30 insertions, 48 deletions
diff --git a/emacs/inits/14-movement.el b/emacs/inits/14-movement.el index a411277..b44778e 100644 --- a/emacs/inits/14-movement.el +++ b/emacs/inits/14-movement.el @@ -1,39 +1,26 @@ -;; Time-stamp: <2021-09-27 08h47 EDT (hobbies)> +;; Time-stamp: <2024-02-29 11h24 CET (f62464ac)> ;; ------------------------------------------------------------------- ;; Repeated key presses for region -(use-package expand-region :ensure t +(use-package expand-region + :ensure t :bind (("M-r" . er/expand-region)) :config (setq expand-region-fast-keys-enabled t - expand-region-contract-fast-key "c" - expand-region-reset-fast-key "e" - expand-region-autocopy-register "i")) + expand-region-contract-fast-key "c" + expand-region-reset-fast-key "e" + expand-region-autocopy-register "i")) ;; ------------------------------------------------------------------- ;; Window switching -(use-package switch-window :ensure t - :bind (("C-x o" . switch-window) - ("C-x C-o" . other-frame) - ("C-c o" . switch-window) - ("C-c n" . switch-window-then-maximize) - :map switch-window-extra-map - ("u" . switch-window-mvborder-up) - ("e" . switch-window-mvborder-down) - ("n" . switch-window-mvborder-left) - ("o" . switch-window-mvborder-right) - ("i" . nil) - ("j" . nil) - ("k" . nil) - ("l" . nil)) +(use-package ace-window + :ensure t + :bind (("C-," . ace-window) + ("C-x o" . ace-window)) :config - (setq switch-window-input-style 'minibuffer - switch-window-shortcut-style 'qwerty - switch-window-multiple-frames nil - switch-window-qwerty-shortcuts - '("a" "r" "s" "t" "n" "e" "i" "o"))) + (setq aw-keys '(?a ?r ?s ?t ?c ?e ?n ?i))) ;; ------------------------------------------------------------------- ;; Character jumping @@ -41,22 +28,22 @@ (use-package avy :ensure t :demand - :bind (("C-," . avy-goto-char-timer) - ("C-." . avy-goto-char-in-line) - ("M-g s" . avy-goto-word-or-subword-1) - ("M-g w" . avy-goto-word-1) - ("M-g a" . avy-goto-word-0) - ("M-g C-g" . avy-goto-line)) + :bind (("C->" . avy-goto-char-timer) + ("C-." . avy-goto-char-in-line) + ("M-g s" . avy-goto-word-or-subword-1) + ("M-g w" . avy-goto-word-1) + ("M-g a" . avy-goto-word-0) + ("M-g C-g" . avy-goto-line)) :config (setq avy-keys '(?a ?r ?s ?t ?g ?k ?n ?e ?i ?o ?q ?w ?f ?p) - avy-dispatch-alist '((?w . avy-action-kill-move) - (?W . avy-action-kill-stay) - (?j . avy-action-teleport) - (?m . avy-action-mark) - (?c . avy-action-copy) - (?y . avy-action-yank) - (?i . avy-action-ispell) - (?z . avy-action-zap-to-char)))) + avy-dispatch-alist '((?w . avy-action-kill-move) + (?W . avy-action-kill-stay) + (?j . avy-action-teleport) + (?m . avy-action-mark) + (?c . avy-action-copy) + (?y . avy-action-yank) + (?i . avy-action-ispell) + (?z . avy-action-zap-to-char)))) ;; ------------------------------------------------------------------- ;; General stuff @@ -69,28 +56,23 @@ (global-set-key (kbd "C-M-e") 'end-of-buffer) (global-set-key (kbd "C-M-a") 'beginning-of-buffer) -(global-set-key (kbd "M-h") 'backward-kill-word) - (global-set-key (kbd "M-z") 'zap-up-to-char) ;; Fast movement -(global-set-key (kbd "M-n") 'scroll-up-command) -(global-set-key (kbd "M-p") 'scroll-down-command) - (global-set-key (kbd "C-S-n") - (lambda () (interactive) (ignore-errors (forward-line 5)))) + (lambda () (interactive) (ignore-errors (forward-line 5)))) (global-set-key (kbd "C-S-p") - (lambda () (interactive) (ignore-errors (forward-line -5)))) + (lambda () (interactive) (ignore-errors (forward-line -5)))) (global-set-key (kbd "C-S-f") - (lambda () (interactive) (ignore-errors (forward-char 5)))) + (lambda () (interactive) (ignore-errors (forward-char 5)))) (global-set-key (kbd "C-S-b") - (lambda () (interactive) (ignore-errors (backward-char 5)))) + (lambda () (interactive) (ignore-errors (backward-char 5)))) ;; Hardcore mode -(defconst hardcore-nav-mode nil) +(defconst hardcore-nav-mode t) (when hardcore-nav-mode (global-set-key (kbd "<XF86Back>") nil) (global-set-key (kbd "<XF86Forward>") nil) |
