Author Topic: Linked Windows in a group?  (Read 473 times)

Aquineas

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Linked Windows in a group?
« on: July 27, 2016, 12:10:26 pm »
Hi folks, I'm new to SlickEdit so hopefully my question isn't too Noobish. I'm trying to recreate some functionality that I rely on in a competitor product that I've used for years but unfortunately hasn't been updated since 2008 (and probably won't ever be updated).

As a c/c++ developer my preferred development method is to generally have my windows vertically split and have two files open per window.  The header goes on the left, the .cpp goes on the right. I might opt to further (temporarily) split the windows to see a different portion of a file, but if it's a file different than either the header or source I'm looking at, I open another window or "view", that gets its header and source split much the same way. I refer to a view as a window that is not overlapping; it is typically maximized in the application window. I can have dozens of files open at a time, and use bookmarks to quickly switch between them. When I jump to a link in a file, it brings up the view which contains that file (which brings the corresponding source or header file along with it).

I'm trying to re-create that same behaviour in SlickEdit. SlickEdit has the split windows that are necessary to pull this off, but unfortunately linking a window doesn't behave in a way that I'd prefer (I can't really figure out what it's doing, to be honest).

In any case, I apologize for the long-winded explanation. If anyone has any tips on this, please share.

Kindest Regards
« Last Edit: July 27, 2016, 12:14:18 pm by Aquineas »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 243
Re: Linked Windows in a group?
« Reply #1 on: July 27, 2016, 03:52:45 pm »
What emulation are you using?

Once I know your emulation, I may have a better idea of whats going on.

Use the edit-associated-file command to open the "other" file. It's on the Right click Context menu. Very handy.

Aquineas

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: Linked Windows in a group?
« Reply #2 on: July 27, 2016, 03:56:32 pm »
Hello Clark, thanks for replying. I am using Brief emulation.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 243
Re: Linked Windows in a group?
« Reply #3 on: July 27, 2016, 04:20:27 pm »
Ah...That complicates things. The problem is that Brief emulation uses "Multiple files share window" for the "Files per window" setting (Tools>Options>Editing>Editor Windows).

If you change it to "One file per window", then after you make make window groups with source and headers, you can easily go back to the group. However, then SlickEdit won't be emulating Brief as precisely. Some of our Brief emulation users have made this change though. Give it a try.

Aquineas

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: Linked Windows in a group?
« Reply #4 on: August 13, 2017, 03:59:11 pm »
I recently built a new pc and have decided not to install my old editor (that I was still clinging to) and to use SlickEdit primarily, so thus I'm faced with this again.
Here is an example of what I'm looking for


I've found that if I use "edit associated file", it smartly figures out that I want to open the associated .h(pp) or .c(pp) file with the same name, but it opens a brand new window. I want one window, split in two (or more) panes. I say "or more" because I might sub-divide a side into different portions of the same file, but generally speaking, the primary vertical separator separates different buffers that I'd like to keep together.

After getting rid of the "one file per window" option, here's what I'm seeing.

If I open the files and manually arrange them by performing the following steps:
1. Open Person.hpp header file
2. Split the window horizontally (Now have Person.hpp:1 on the left, and Person.hpp:2 on the right).
3. Switch to the right side and then open Person.cpp on the right side.
4. This is the desired state, but things get messy if I want to open a new source grouping of a header/source, which I would want a new (full client/screen) window for.  What I do is set bookmarks between the open files and jump between them, which will bring the new header/source to the forefront if where I'm jumping isn't on either of the buffers I have open. When on the Person.cpp, if I open a new file, the window on the right gets a new tab with the new file in the tab on the right side, again not what I was hoping for.

Trying the "Link window" method:
1. Open Person.hpp
2. Open Person.cpp. I now have two tabs, one marked Person.cpp, the second marked ".hpp" (in that order)
3. Switching to the ".hpp" tab and selecting "Link Window" method
4. Not really sure what it's doing.

So here are my questions:
1. Is it possible to keep two buffers "grouped" in a single window, forever mated?  If I open a new buffer it gets a new window?
2. What exactly is "Link window" supposed to do?

« Last Edit: August 13, 2017, 04:03:48 pm by Aquineas »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 243
Re: Linked Windows in a group?
« Reply #5 on: August 13, 2017, 07:00:29 pm »
Link window is only useful in one file per window mode. Otherwise, it's useless. Link window is a bit like turning off one file owe window mode, opening a file, and then turning it back on.

There isn't a macro for auto grouping two windows.