2

As these two questions show:

there is a need to control gedit tabs behavior when opening a file.

For example, always force to open in new window or always force to open in new tab, even if it is in an other workspace.

Is there a way to access this parameter somewhere?

NB: by "tabs" I mean the element of graphical interface allowing to edit multiple files in the same window as shown in the picture below

enter image description here

1 Answers1

0

I have a similar requirement for certain works I do and need to open two text files in two different windows - one on laptop screen and the other on the extended screen. I couldn't find any setting to force using or not using tab for new file, perhaps it will be available in future. But for the time being I created a nautilus script to achieve the desired functionality.

Created a file named "Gedit-New-Window" in the nautilus scripts folder, added the required command and assigned executable permission to it. Here's how in terminal:

cd ~/.local/share/nautilus/scripts
nano Gedit-New-Window
#!/bin/sh
gedit --new-window $@
^O
^X
chmod +x Gedit-New-Window

For new Ubuntu/Linux users unfamiliar with nano: ^O (Ctrl + o) and ^X (Ctrl + x) above are nano keyboard commands to write out the file and exit.

Now, whenever a file needs to be opened in a Gedit new window, I right-click on the file in nautilus, click on "Scripts" in the context-menu, then click on "Gedit-New-Window" that shows as one of the options.

Sri
  • 1,743