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?

Toothrot
  • 3,204
  • 1
  • 12
  • 30

1 Answers1

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 08 '19 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 09 '19 at 05:57