I know some other text editors like Notepad++ enable split pane to edit to files side by side. Is there any way I can add this functionality to Gedit?
Update: Gedit has now added this feature. I'm keeping my answer around for those using older versions of the application.
Gedit does not come with this feature.
But there is a plugin you can get:
Splitview plugin (Archived page from Gedit/Plugins - GNOME Live)
Splitview plugin source code (Archived page)
Not yet, but it's in development see here (Gedit/Multiviews - GNOME Live!), someone's working on it (among other features) as a GSOC project as far as I know.
The new developments don't seem to go anywhere, but at least in Ubuntu 16.04 there is a workaround using also tabs as requested by the OP and with a read-only side:
- Open the file in a first window.
- Go to Documents->New Tab Group (or press
Ctrl+Alt+N) as suggested by @thangdc94. This will vertically split the window opening a new document as a tab on the right side.
- Open a second window and open again the same file:
gedit --new-window file. It will tell you that the file is opened somewhere else and ask you if you want to edit the file anyway. My suggestion is to use "Don't Edit", otherwise you'll be overwriting your own changes from one window to the other. It's better to use one for writing an the other for reading/copying.
- The tricky points: Open a new tab in the second window, so now you can see tabs instead of only the document.
- The tricky points: Drag from the second window, the tab of your document and drop it as a tab in the right side of the original window.
- Now you can close the second window and remove the undesired tabs of the right side of the original window.