Fix shift-arrowkey hotkeys in org mode.

This commit is contained in:
Tom Alexander 2025-02-07 19:01:49 -05:00
parent 3ed43b1b8a
commit 24d83e95a5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 22 additions and 6 deletions

View File

@ -51,6 +51,7 @@
;; Persist history over Emacs restarts. Vertico sorts by history position. ;; Persist history over Emacs restarts. Vertico sorts by history position.
(use-package savehist (use-package savehist
;; This is an emacs built-in but we're pulling the latest version ;; This is an emacs built-in but we're pulling the latest version
:pin gnu
:config :config
(savehist-mode)) (savehist-mode))
@ -60,8 +61,16 @@
(which-key-mode)) (which-key-mode))
(use-package windmove (use-package windmove
:config ;; This is an emacs built-in but we're pulling the latest version
(windmove-default-keybindings)) :pin gnu
:bind
(
("S-<up>" . windmove-up)
("S-<right>" . windmove-right)
("S-<down>" . windmove-down)
("S-<left>" . windmove-left)
)
)
(setq tramp-default-method "ssh") (setq tramp-default-method "ssh")

View File

@ -1,16 +1,23 @@
(use-package org (use-package org
:ensure nil :ensure nil
:commands org-mode :commands org-mode
:bind ( :bind (:map org-mode-map
("C-c l" . org-store-link) ("C-c l" . org-store-link)
("C-c a" . org-agenda) ("C-c a" . org-agenda)
("C--" . org-timestamp-down) ("S-<up>" . org-shiftup)
("C-=" . org-timestamp-up) ("S-<right>" . org-shiftright)
("S-<down>" . org-shiftdown)
("S-<left>" . org-shiftleft)
) )
:hook ( :hook (
(org-mode . (lambda () (org-mode . (lambda ()
(org-indent-mode +1) (org-indent-mode +1)
)) ))
;; Make windmove work in Org mode:
(org-shiftup-final . windmove-up)
(org-shiftleft-final . windmove-left)
(org-shiftdown-final . windmove-down)
(org-shiftright-final . windmove-right)
) )
:config :config
(require 'org-tempo) (require 'org-tempo)