I would like to open the file foo.bar twice (or more) in emacs, so I can edit two different parts of it simultaneously. Is it possible? Probably the better question is, how to do it? Is there a way to open each instance in its own buffer/frame?
| |||
feedback
|
|
You can open the same buffer in more than one window (which can be spread amongst different frames), but it's not very convenient. Each window has its own point, but they all share the mark, the file mode, the narrowing and other characteristics, because apart from the point pretty much all characteristics are tied with the buffer. Also, if you happen to visit another buffer in one window, you'll lose your place in the file. You can make an indirect buffer which has its own point, mark, modes and so on, but the same content as the original buffer (and saving either buffer writes to the same file). To create a second buffer that is a clone of the current buffer, run | |||
|
feedback
|
|
Split screen mode. Where c-x means press and hold ctrl key and type an x. Then type the number following.
or
Then you can scroll them independantly on the same file or open another buffer if you wish in one of them. To return to a single view type
If you wish you can split each screen (section) as many times as required. Select the screen you want to split first and then perform a horizonal or vertical split on it. | |||||
feedback
|