dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 4dbce2072c1484094a08d8333a635050985e1c65
parent 4720074e930af287f29127962847e147708d5139
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Fri, 20 Mar 2020 18:05:12 +0100

Stop using C-tab for other-window

Use C-x o with repeatable o instead.  This removes a conflict with
Magit and Org bindings.

Inspiration: https://emacs.stackexchange.com/a/52203/10209

Diffstat:
M.emacs | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/.emacs b/.emacs @@ -36,6 +36,15 @@ (global-set-key (kbd "C-x C-b") 'ibuffer) +(defun my/other-window (count &optional all-frames) + (interactive "p") + (let ((repeat-map (make-sparse-keymap))) + (define-key repeat-map [?o] #'other-window) + (set-transient-map repeat-map t) + (other-window count all-frames))) + +(global-set-key (kbd "C-x o") #'my/other-window) + ;; Hopefully these will be easier to remember than TeX commands: (require 'quail) @@ -139,7 +148,6 @@ (when window-system (load-theme 'eighters t) ;; Bindings ala Terminator - (global-set-key [C-tab] 'other-window) (global-set-key (kbd "C-S-o") 'split-window-below) (global-set-key (kbd "C-S-e") 'split-window-right) (global-set-key (kbd "C-+") 'text-scale-adjust) @@ -181,14 +189,6 @@ (delight 'compilation-in-progress "βš™" 'compile) (message "TODO: tweak compilation lighter")) -(defun my/magit-mode-hook () - (when window-system - (local-set-key [C-tab] 'other-window) - (local-set-key (kbd "C-i") 'magit-section-cycle) - (local-set-key (kbd "<tab>") 'magit-section-toggle))) - -(add-hook 'magit-mode-hook 'my/magit-mode-hook) - (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh t) ;; Don't use Customize here, since that would set the variable's value