Quantcast

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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Tomas Nordin-2
Hi List

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.

Best regards
--
Tomas Nordin | (The computing freedom explorer)
GPG Key: AB09AF78

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Kaushal Modi
Have a look at the hydra package.

The hydras can be made as complex as you like:
https://github.com/abo-abo/hydra/wiki/Window-Management :)

On Thu, Apr 20, 2017 at 3:48 PM Tomas Nordin <[hidden email]> wrote:

> Hi List
>
> 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.
>
> Best regards
> --
> Tomas Nordin | (The computing freedom explorer)
> GPG Key: AB09AF78
>
> --

Kaushal Modi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Eric Abrahamsen-2
In reply to this post by Tomas Nordin-2
Tomas Nordin <[hidden email]> writes:

> Hi List
>
> 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?

Not this, but my all-time favorite basic Emacs customization is
re-binding "M-o" to `other-window'. With that customization, all you
need to do is hold down the meta key and keep whacking "o" to cycle
through all the visible windows. And who needs the fonts thing anyway!


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Drew Adams
In reply to this post by Tomas Nordin-2
> 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 ...'

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Tomas Nordin-2
In reply to this post by Eric Abrahamsen-2

> Not this, but my all-time favorite basic Emacs customization is
> re-binding "M-o" to `other-window'. With that customization, all you
> need to do is hold down the meta key and keep whacking "o" to cycle
> through all the visible windows. And who needs the fonts thing anyway!

Good point, certainly an aproach

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Tomas Nordin-2
In reply to this post by Drew Adams
Drew Adams <[hidden email]> 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.

Loading...