I want to view the same file side-by-side. How do I open up two (or more) tabs for a single file?
In Word, it is possible to open the same file twice, so that the same document appears in two Windows. This is very helpful when you need to reference one part of the document while you are working on another part of the document elsewhere in the file.
First, open the application you want to run in multiple instances. Then, hold down the Shift key on your keyboard and click with your cursor - or tap with your finger - on its taskbar icon. One click or tap opens a new instance, two clicks or taps open two, and so on.
In fact, in this case, when you call open() twice on the same file, you get two different file descriptors pointing to the same file (same physical file).
Yes, but why didn't you just try it? (Might actually be OS dependent.) If you want multiple offsets within the file to read, mmap() may be an option too, depending on your OS. Then you can just index into the file using memory addresses.
File | New View into File will open a second tab for the same file. This can be moved into another window or tab group.
(Even if it's already open in another pane.)
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