1

Hi I just noticed that if you creating a new view on jEdit, when you editing the new one, it affected the text on the original window's text as well, how could I create a New view that allow the user to duplicate data for the current shown view only and not effecting the old ones?

I try to find solutions on the source code, then I find seems there are setting that related to this: http://www.jedit.org/users-guide/buffersets.html but I didn't find the selection mentioned on my setting.

Judy Wong
  • 13
  • 3
  • I can't find the buffer sets on my jEdit, while it's version 4.3 – Judy Wong Oct 19 '13 at 19:41
  • The doku you refer to is for the latest jEdit version. In 4.3 the buffer sets were already there, but you might find the options elsewhere. You should refer to the help that is shipped with your jEdit version to get the right place to look at or upgrade your jEdit to 5.1 which is the current version. – Vampire Oct 21 '13 at 10:21
  • Also, buffer sets are probably not what you are after. The only control which buffers are shown in specific view or edit pane (splitted view has multiple edit panes) e. g. in the integrated buffer switcher or in the buffer tabs plugin that shows the buffers as tabs. But if a buffer is open in two views with differing buffer sets you still edit the same buffer instance and thus changes are synchronized. – Vampire Oct 21 '13 at 10:24
  • yeah, so far I'm editing the source code, and trying to find a way to stop this synchronized buffer between new window and old windows, until now I can't find any reasonable value related to this... – Judy Wong Oct 21 '13 at 16:29
  • I don't think there is an easy way. That does not fit in the concept. There is one Buffer for one physical file. If you open a new View, this only a new TextArea with a new EditPane that shows the SAME Buffer. There is no synchonization that you can switch off, as it is the same thing you look at through different windows. The same is if you split your jEdit TextArea, then you have two EditPanes within the same TextArea within the same View that can show the SAME Buffer. You can show different locations in the Buffer, but the Buffer is identical. – Vampire Oct 22 '13 at 08:10

1 Answers1

3

For having independent edit windows, you have to start independent jEdit instances with independent settings directories. You can either start a new jEdit instance without restoring any settings (this includes also plugins installed to the settings directory which is the default) by using the -nosettings parameter, or you can start a second jEdit instance with a different settings directory with -settings=/path/to/settings/directory which has independent settings like open files, installed plugins to settings directory and so on. You could copy your existing settings directory and delete the file /path/to/settings/diretory/server to have a copy of your existing settings in the second instance. But from then on, the settings are independent and if you change settings, plugins, and so on in one instance, it will not resemble in the other instance unless you sync your settings directories again.

Even with two independent running jEdit instances, if you save the file in one instance, the other instance will pop up a message box informing you that the file changed on disk and ask you what to do if you didn't configure a default option.

Probably the easiest would be to simply open a new buffer and copy & paste the contents of the buffer in question to this new buffer. This could also be done by a Macro which you can then also assign a keyboard shortcut or toolbar button to.

Ross Rogers
  • 23,523
  • 27
  • 108
  • 164
Vampire
  • 35,631
  • 4
  • 76
  • 102
  • Hi, Thanks for answer my question, I'm trying to find options to create a new buffer in the same time when I open a new window, which I add a new label to the browser called new buffer view, then I noticed the new view class share the same buffer... besides I'm using jEdit 4.3 pre 9, which don't have buffer setting class yet... – Judy Wong Oct 21 '13 at 15:03
  • I'm sorry, but I don't really get what you mean or what you described you try to do. Maybe two questions, why do you use a 7 years old pre-release version of jEdit when there are many more recent releases? And what is your use-case, why do you try to achieve what you try to achieve, maybe there is a better solution to your problem. – Vampire Oct 22 '13 at 08:16