Reputation: 39079
Say I have opened a file abc.cpp in one Emacs window, I want to open it in another window. If I do C-x C-f and locate the file, the cursor goes back to the original window and the file does not open in the window where I placed my cursor. If I do C-x b and identify the buffer, the cursor goes to the original window as well. I hope I can put my cursor in some other window, and open the file in that window, no matter whether the file is opened already. How can I do that? One way that seems to work is to use mouse, go to File menu and choose Open File, but that is not very nice...
Upvotes: 2
Views: 1191
Reputation: 29001
Alternatively to what @vonbrand said, you can always call new-frame
(M-x new-frame
) and the current opened file will open in a new frame (window).
Upvotes: 1
Reputation: 11791
That one is easy! The command C-x 2
will split the window showing the buffer in two horizontally. The relevant command is split-window-vertically
.
Upvotes: 4