Topic: Editor Panels

Would it be possible to have another entry on the file tab context menu for
"Create New View"? If the file name is "file.f90", the new tabs would be named
"file.f90 (1)", "file.f90 (2)" etc.

Then once a new view has been created we would be able to move it to its own panel using
the existing "Move to New Panel".

Currently there isn't a way to view two parts of a large file which don't both
fit into a window (e.g. lines near the top and lines in the body of a long subroutine).
Having a "Create New View" option would provide a simple "split window" facility using the
existing Panels.

--
David

Re: Editor Panels

David,

Two views of the same file is a bit more complicated than what the description of such a feature lets on.  The problem isn't the mechanics of the tab/panel paradigm currently being used.  Rather, the difficulty is related to having edits propagate between both views.  It's possible, but it requires a good deal of work and, more importantly, testing.

However, plenty of people have requested this feature, so I'll look into incorporating it into 2.19 (version 2.18 is just about done, so it won't make it into that release).

Jeff Armstrong
Approximatrix, LLC

Re: Editor Panels

Thanks.

I assume you need only copy keyboard/mouse events to each window that is open on the same file and that the view windows will naturally clip off any edit events that are not in view in a window.

I don't know how much of this is supported directly by the editing component and how much would have to be written uniquely for Simply Fortran's GUI.

--
David

4 (edited by JohnWasilewski 2014-12-22 08:33:23)

Re: Editor Panels

I am forever needing to see two parts of the same source file. 
I employ a range of strategies, all a bit clumsy, some a bit risky (risk of forgetting where I'm editing).

  - Often, I SAVE-AS a dummy filename then re-open the
    original file, so that I can open two versions of the same file.

  - Some times, I use a text viewer to display the same file
    in a separate window.

  - I also use a directory/file utility to open an archived earlier
    version of a project then view the same source file.

  - Also possible: run two copies of SF.

Here's a better idea:

Have SF permit the same file to be opened in, not just 1 or 2, but multiple tabs.
Always make the first tab to be opened for any file, that file's editable tab.
Whenever a 2nd, 3rd,..Nth tab is opened for a file, make it a read-only copy.
Show the user that a tab is read-only by displaying the text in monochrome.

I'd be very happy with something like this.  It would be very helpful.

A slightly improved version would have all tabs editable until the user actually edits one.  This would toggle all other tabs of the same file to read-only, with mono displays.  SAVEing the editable tab would toggle all read-only tabs back to editable.
---
John

Re: Editor Panels

My suggestion of a "Create New View" was not intended to be restricted to 2 windows into a file.

When I need to see multiple views I usually resort to an external editor (vim). In such cases where a file is edited with an external tool, it would be useful if the Simply Fortran editor issued a "Warning: changed outside, reload yes/no" message.

Overall, I am quite happy with Simply Fortran and would gladly wait for version 3 for these features if they cannot be done soon.

--
David

Re: Editor Panels

Creating multiple views of the same file in separate tabs is implemented in the development version.  It will be available in version 2.19.   Because of the way the feature is implemented, there is no restriction on the number of "views" of the same file.

Jeff Armstrong
Approximatrix, LLC

Re: Editor Panels

Jeff,
Thanks - look forward to trying this out.

Happy holidays and best wishes for 2015.

--
David

8 (edited by davidb 2015-01-06 19:14:34)

Re: Editor Panels

Thanks very much Jeff.

The new "Create Another Panel" feature in 2.19 does what is suggested and is a very valuable feature I think.

I have not found any issues with it (even with multiple views open). The fact that the tabs are named the same isn't an issue for me.

However, I have noted that the panel configuration is not saved with the project and perhaps it should be saved when "Remember Project Tabs" is selected in the Options menu. Maybe have a more expressive option to "Remember Project Tabs and Panels"?

To be fair, I don't think panels were saved in 2.18. I only noticed it now because the use of multiple panels has become instantly more useful with this new feature.

I will provide some feedback on the debugger changes in another post when I have evaluated them. There seems to be a lot of changes and a few funny things happening.

--
David

Re: Editor Panels

David,

The "Remember Project Tabs" option is quite naive.  What the option is actually doing is simply storing which project files are open.  It doesn't retain any information about, for example, tab ordering, let along panel positions.  Adding more functionality to this feature is possible, of course.

Jeff Armstrong
Approximatrix, LLC