Remap org-shiftmetaright | org-shiftmetaleft to [shift-select-meta]left-word | [shift-select-meta]right-word]

后端 未结 3 1541
日久生厌
日久生厌 2021-01-21 20:18

Could someone please give me a hand remapping org-shiftmetaright | org-shiftmetaleft to [shift-select-meta]left-word | [shift-select

相关标签:
3条回答
  • 2021-01-21 20:51

    If you just set (setq org-replace-disputed-keys t), org-mode will remap those conflicting keys. It is also preferable since you can still use Shift + Arrow keys in date selection.

    Please see http://orgmode.org/manual/Conflicts.html for more information.

    0 讨论(0)
  • 2021-01-21 20:51

    Believe it or not I wanted to do this also. I followed the above - I also re-bound those commands to the C- key:

    (eval-after-load "org"
    '(progn
     (define-key org-mode-map (kbd "<M-S-left>") nil)
     (define-key org-mode-map (kbd "<M-S-right>") nil)
     (define-key org-mode-map (kbd "<M-left>") nil)
     (define-key org-mode-map (kbd "<M-right>") nil)
     (define-key org-mode-map [C-S-right] 'org-shiftmetaright)
     (define-key org-mode-map [C-S-left] 'org-shiftmetaleft)
     (define-key org-mode-map [C-right] 'org-metaright)
     (define-key org-mode-map [C-left] 'org-metaleft)
     (define-key org-mode-map [C-S-return] 'org-insert-todo-heading)
     ))
    
    0 讨论(0)
  • 2021-01-21 20:56

    As you just want to fall back to the default behaviour for these bindings, we can simply remove the org-mode overrides.

    (eval-after-load "org"
      '(progn
         (define-key org-mode-map (kbd "<M-S-left>") nil)
         (define-key org-mode-map (kbd "<M-S-right>") nil)
         (define-key org-mode-map (kbd "<M-left>") nil)
         (define-key org-mode-map (kbd "<M-right>") nil)))
    
    0 讨论(0)
提交回复
热议问题