help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Can I use 'C-x o o o o o' instead of C-x o C-x o C-x o C-x o C-x o?


From: Jorge A. Alfaro-Murillo
Subject: Re: Can I use 'C-x o o o o o' instead of C-x o C-x o C-x o C-x o C-x o?
Date: Tue, 28 Apr 2015 09:50:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

張國良 writes:

Scenario 1 - I split many windows. - I wish to switch to some other windows. - I type C-x o, C-x o, C-x o repeatedly until the cursor landed on the desired window. Is there a way to use C-x o o o instead? I aware that I can use C-u num C-x o, if I know the desired window is num step away. But there are times that I do not know 'num'. Scenario 2 - I use the windmove package. - I bind the windmove-up/down/left/right to C-o i, C-o k, C-o j, C-o l respectively. Now, if I want to windmove to up-left, I type C-o i, C-o j. Is there a way to use C-o i j instead?

You could try something like:

#+BEGIN_SRC emacs-lisp
 (defvar your-extended-keymap (make-sparse-keymap))
 (define-key your-extended-keymap (kbd "o") 'other-window)
(advice-add 'other-window :after (lambda () (set-transient-map your-extended-keymap))) #+END_SRC


Many thanks.


Best,
--
Jorge.




reply via email to

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