9

On Windows most document editing applications have a Window/New window menu item to get more views on the same document.

Is it possible to do the same, somehow in gedit? It seems gedit is trying as hard as it can to avoid opening the same file twice.

2
9

Run gedit from the commandline with the --new-window option:

gedit --new-window file

That will let you open a new gedit window on the same file. You'll get this warning which you can ignore:

This file "/path/to/file" is already open in another window.
Do you want to edit anyway? Edit AnywayDon't Edit

8

Yes you can. Open gedit and your file, then right click the gedit icon on the launcher and open a new window. Now you can open the file again in the new window. Seems it won't let you do this by tabs though.

enter image description here

For those not using unity you can run

gedit --new-window

For a new window and then open your file, or

gedit --new-window path/to/file

To open a file directly.

2
  • I'm using OpenBox as window manager and I don't have launcher...
    – Calmarius
    Dec 11 '15 at 13:15
  • Updated with non unity solution
    – Mark Kirby
    Dec 11 '15 at 13:20
3

Yes you can

  1. open your file with gedit
  2. click the file name in the gedit tab so and drag it out like so.

enter image description here

This will create a new gedit window

enter image description here

now open the same file in the other gedit window

enter image description here

Then click Edit Anyway

7
  • 5
    This doesn't work in the newer gedit versions since the Gnome folks in their infinite wisdom decided that we don't want usable interfaces and that more than three buttons confuse us. The newer versions therefore, lack this tab (and any other useful UI). The tab does appear if you create a new document but dragging it just removes it from the original window, it doesn't duplicate it.
    – terdon
    Dec 11 '15 at 13:25
  • 1
    Working for me on Unity and gedit 3.10.4 . Dragging the tab opens new empty window.
    – Mark Kirby
    Dec 11 '15 at 13:30
  • @terdon im runnuing xubuntu 14.04 gedit version is 3.10.4 what version do you have ?
    – Neil
    Dec 11 '15 at 13:31
  • 3
    I have 3.18.2 on Arch and Cinnamon. Gnome is generally moving to a more minimalist UI, imposing their own window decorations and removing the traditional buttons and menus. They seem to think it makes them cooler or something. It is extremely annoying. Check out the screenshots here to see what I mean.
    – terdon
    Dec 11 '15 at 13:34
  • Virus, harmful program... great easter egg you putted there.
    – Star OS
    Dec 16 '15 at 9:04
2

In case anybody still wonders, at least in Ubuntu 16.04 there is a workaround using also tabs as requested by the OP and with a read-only side (just replied here):

  1. Open the file in a first window.
  2. Go to Documents->New Tab Group (or press Ctrl+Alt+N). This will vertically split the window opening a new document as a tab on the right side.
  3. Open a second window and open again the same file (as suggested by @terdon: 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.
  4. The tricky points: Open a new tab in the second window, so now you can see tabs instead of only the document.
  5. 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.
  6. Now you can close the second window and remove the undesired tabs of the right side of the original window.
0

Install gedit-plugins (in Ubuntu Software Center it is listed as an optional add-in for Gedit.) Then launch Gedit: Edit > Preferences > Plugins, enable Multi Edit, which enables editing a document in multiple places simultaneously.

2
  • This doesn't answer the question. The OP wants more views on the same document, not to enter the same text in many places. Dec 16 '15 at 9:52
  • My apologies, I misunderstood the Multi Edit plugin. Moderator, please feel free to delete my responses.
    – user173876
    Dec 18 '15 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.