summaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
authorKรฉvin Le Gouguec <kevin.legouguec@gmail.com>2020-03-20 18:05:12 +0100
committerKรฉvin Le Gouguec <kevin.legouguec@gmail.com>2020-03-20 18:05:12 +0100
commit4dbce2072c1484094a08d8333a635050985e1c65 (patch)
tree78ba5cef547059ff41510b4789d45113e9499257 /.emacs
parent4720074e930af287f29127962847e147708d5139 (diff)
downloaddotfiles-4dbce2072c1484094a08d8333a635050985e1c65.tar.xz
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 (limited to '.emacs')
-rw-r--r--.emacs18
1 files changed, 9 insertions, 9 deletions
diff --git a/.emacs b/.emacs
index 3d48a4a..51f4004 100644
--- 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