0

If I have 3 windows beside each other, can I switch to any one of them without having to look for the cursor first (so I know whether to press C-x o once or twice)?

Is there, for example, or could I easily write, a function that jumped to the PREFIXth window from the left?

3

If I understand correct, maybe ace-window would be the right thing for you. I configured it like this

   (use-package ace-window
    :ensure t
    :init
    (global-set-key (kbd "C-c o") 'ace-window))

This numbers your windows and you just press the number of the window you want. Hope this helps.

EDIT: I think ace-window fits best to Toothrots question. Just to mention, I am mostly using

(windmove-default-keybindings)

to quickly navigate windows and I am very happy with it. A more detailed description for that can be found here

  • Don't you want to rather bind it to the key originally bound to other-window? (C-x o) – JeanPierre May 8 at 16:23
  • you are right JeanPierre, just a habit, sometimes I use original other-window as well. Maybe your keybinding would be the better choice. I mostly navigate buffers using windmove. Maybe I should edit my answer and add this also. – AltruisticDelay May 9 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.