[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Just o after C-x o (other-window)

From: Tomas Nordin
Subject: RE: Just o after C-x o (other-window)
Date: Fri, 21 Apr 2017 22:55:58 +0200

Drew Adams <> writes:

>> I would like the other-window function to behave like text-scale-adjust.
>> I mean, after hitting `C-x o` to select next window, I want `o` to mean
>> next-window again. Any other key would escape this minor mode. Did
>> somebody here by any chance implement that already?
>> The text-scale-adjust function behaves like that, after `C-x C-+` it is
>> enough to hit `+` or `-` to further adjust the scaling, which I think is
>> excellent.
> (defun other-window-repeat ()
>   "Repeatable `other-window'."
>   (interactive)
>   (require 'repeat)
>   (repeat-command 'other-window))
> (defun repeat-command (command)
>   "Repeat COMMAND."
>   (let ((repeat-message-function  'ignore))
>     (setq last-repeatable-command  command)
>     (repeat nil)))
> (global-set-key [remap other-window] 'other-window-repeat)
> Then just use `C-x o o o o o ...'

Nice, exactly the answer I was hoping for. Thanks, this behaviour fits
my brain somehow.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]