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?

1 Answer 1


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
    (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


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
    Commented May 8, 2019 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. Commented May 9, 2019 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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