just switched from single to dual monitors
have managed to utilise both screens with emacs by using C-x 5 f
to open a file in a buffer in a new frame, i can drag that frame on to the 2nd monitor and enjoy my extra real-estate
Prob I now have is how to efficiently switch between buffers in different frames
I'm used to using C-x o
to switch between buffers in a split frame on a single monitor but this doesn't work for multiple frames
Having to use the more cumbersome C-x 5 b <buf-name>
which is painful in comparison
Anyone have any top-tips on how to make buffer switching more efficient across dual monitors?
Ideally I would like to cycle across all buffers using a single simple keyboard shortcut regardless of frames
I'd expect C-x 5 o
to switch to the other frame, tho I don't have such a dual-screen setup to verify.
With separate frames, I use the following to get mac osx style "same-app" switching with cmd-backtick. If you're on linux / windows you could do the same thing with alt-tilda:
(defined-key global-map (kbd "M-`") 'other-frame)
I like this because it keeps the action of switching frames separate from switching buffers. With multiple screens, it's usually some kind of context switch when you want to change which one has focus.
Turning my comment above into an answer as it seems to be what the OP is after:
(defun other-window-visible ()
(interactive)
(other-window 0 'visible))
(global-set-key "\C-xo" 'other-window-visible)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With