Recent

Author Topic: [SOLVED] Sourse Editor (2)  (Read 4287 times)

WickedDum

  • Full Member
  • ***
  • Posts: 211
[SOLVED] Sourse Editor (2)
« on: January 27, 2015, 09:38:00 pm »
When I open Lazarus by clicking on an .lpi file, why does a "Source Editor (2)" window pop up on occasion?
« Last Edit: January 28, 2015, 05:42:04 pm by WickedDum »
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Sourse Editor (2)
« Reply #1 on: January 27, 2015, 10:18:45 pm »
Not sure what exactly happens for you. But here si what should happen.

You can open the same unit/file in several (synchronized) editors. If you do this and close the project with more than one editor open, then this is sawed to the session.

If you open a project that has such a session (a project you saved, or maybe a project some one else saved), then this is restored.


WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: Sourse Editor (2)
« Reply #2 on: January 27, 2015, 10:35:37 pm »
Thanks, Martin.

I know that if I open several files, they will be visible as tabs across the top of the editor window.

I didn't know I could open several editors.  I'll watch out for that.

Thanks, again!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Sourse Editor (2)
« Reply #3 on: January 28, 2015, 02:10:48 am »
Right click any of the tabs there are 2 entries:
"Move to new window"
"Clone to new window"

The 2nd means that the file will be open in 2 (or more) editors at the same time. Changes made in any one editor will appear in all open copies.


You can also assign this to key shortcuts.

Once a 2nd window is open, tabs can be dragged and dropped.

WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: Sourse Editor (2)
« Reply #4 on: January 28, 2015, 09:36:17 am »
Thanks for the info.

It brings to mind a question, though:  Why would you open more editor windows if changes that you make in one are visible in all of the other open copies?

Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Sourse Editor (2)
« Reply #5 on: January 28, 2015, 10:47:18 am »
There are doubtless many reasons.
One is so that you can have part of the unit source (say a complex class declaration) always visible for reference without having to scroll to and fro in the editor where you are currently writing.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Sourse Editor (2)
« Reply #6 on: January 28, 2015, 12:07:58 pm »
Firs of all, changes must be in all, otherwise, if I modified one part in the 1sh window, and another part in the 2nd window, then when I save each of them the 2nd save overwrites changes from the 1st.

Why would I open several windows?

So I can scroll them to different locations. If I work on big files, then I often need to see several locations in the same file.

This also applies to seeing 2 different files side by side.



WickedDum

  • Full Member
  • ***
  • Posts: 211
[SOLVED] Sourse Editor (2)
« Reply #7 on: January 28, 2015, 05:41:30 pm »
Fair enough!

Thank you, gentlemen!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

 

TinyPortal © 2005-2018