[Lazarus] Lazarus code editor, how to show invisible tabs?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
I have encountered a strange problem in Lazarus (2.0.8 on Raspbian
Buster linux).

I have a fair number of source files open in tabs. The file names
could be rather long too.
So then the tabs displaying file names do not fit sidewise on the
screen so the list of tabs is truncated left and right.

If I have edited a file to the right that has brought the leftmost tab
out of the visible area of the tabs I can no longer get back to the
leftmost side of the editor where my main project files should
live....
The leftmost VISIBLE tab is the most "leftish" file I can reach.

I have noted that the left arrow "button" in the tabs section is not
clickable since the mouse pointer always changes to the resize double
arrow when I move to the location of the left arrow...
Not even selecting the leftmost tab changes this behaviour with the
left arrow button being unclickable.

But if I *resize* the code editor with the mouse (and bring it back to
where it was originally), THEN the left arrow button becomes clickable
(turns dark)!

At this time I can click it ONCE ONLY(!) to scroll the file tabs one
tab over...

Then I have to repeat the sequence of resize followed by clicking the
arrow again.

The right arrow button on the other side does not work in this strange
way, it is always switching selected tab towards the right side..

Is this by design or is there a setting somewhere to disable this
strange behaviour for the left arrow button?

In the Delphi 2007 editor there is a down arrow to the right side
which if clicked displays a list of files open in the editor and by
selecting the wanted file that tab is immediately brougt into focus.
Can Lazarus be configured to display such an editor file list too?
If so how?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
On Thu, 30 Jul 2020 18:05:46 +0200, Bo Berglund via lazarus
<[hidden email]> wrote:

>Is this by design or is there a setting somewhere to disable this
>strange behaviour for the left arrow button?
>
>In the Delphi 2007 editor there is a down arrow to the right side
>which if clicked displays a list of files open in the editor and by
>selecting the wanted file that tab is immediately brougt into focus.
>Can Lazarus be configured to display such an editor file list too?
>If so how?

In fact if I use the Windows version of Lazarus 2.0.8 there are 2
arrow buttons on the top right hand side of code editor wich work
satisfactorily for the purpose of scrolling the tabs.
Can that not also be enabled in Linux, please?

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 30/07/2020 18:05, Bo Berglund via lazarus wrote:
> the most "leftish" file I can reach.
>
> I have noted that the left arrow "button" in the tabs section is not
> clickable since the mouse pointer always changes to the resize double
> arrow when I move to the location of the left arrow...
Sounds like a bug.

> In the Delphi 2007 editor there is a down arrow to the right side
> which if clicked displays a list of files open in the editor and by
> selecting the wanted file that tab is immediately brougt into focus.
> Can Lazarus be configured to display such an editor file list too?
> If so how?
>
>

If you right click any tab, the context menu has entries for each file.
They are grouped by package.
There also is a "recent" sub menu.

If the popup on tabs does not work for you for some reasons, go to Tools
 > Options > Editor > mouse
And assign to any mouse button (with any shift/ctrl/alt) the "context
menu (tab)". This will work with the mouse over the text.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
On Thu, 30 Jul 2020 18:24:29 +0200, Martin Frb via lazarus
<[hidden email]> wrote:

>
>If you right click any tab, the context menu has entries for each file.
>They are grouped by package.
>There also is a "recent" sub menu.
>
>If the popup on tabs does not work for you for some reasons, go to Tools
> > Options > Editor > mouse
>And assign to any mouse button (with any shift/ctrl/alt) the "context
>menu (tab)". This will work with the mouse over the text.

Thanks, I did not know about this...
Different approach but with more options! :)
Solved my problem, but I still wonder about the left arrow button...

When talking about project files, I wonder what is the advantage of
adding the files into the project over just having them reside in the
project source directory?
I have noted that whenever I start a new unit in the IDE File menu
this file gets added to the project along with the lpr file.

All other files I have retrieved from subversion and brought into the
source dir are not, but seems to work fine anyway.
Except now with this rightclick on the tab they are now located under
"Other tabs" instead of "Tabs for project"...

And are "project files" going to be listed in the lpi or lps file?
Because they are not in the lpr file...

Which of these should go into SVN control?
<project>.lpi is what I have there now.
I think one is just transactional data and the other holds settings
and such.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
On 30/07/2020 19:11, Bo Berglund via lazarus wrote:
> When talking about project files, I wonder what is the advantage of
> adding the files into the project over just having them reside in the
> project source directory?
> I have noted that whenever I start a new unit in the IDE File menu
> this file gets added to the project along with the lpr file.
The compiler always searches the whole directory/ies, when encounter a
unit in uses.

The IDE, I don't know what it uses, and when, and whatfor.

> And are "project files" going to be listed in the lpi or lps file?
> Because they are not in the lpr file...
They will go into:  lpi  Lazarus Project Info

"lps" / Project Session is optional. And stores info such as which files
are open in which tab, how are they scrolled/folded, where is the cursor
......
lps can be embedded in lpi, can be in its on file, or not exist at all

> Which of these should go into SVN control?
> <project>.lpi is what I have there now.
*.lpr ( that is actually a normal source, but generated by the IDE)
*.lpi
.res / .ico (if you did nothing special it can be regenerated, but
otherwise)

Not in version control is usually .lps (because if there are several
people working on the project, they have each there own session).
You can even tell the IDE to store lps files in the primary-conf-path,
instead of the project folder.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Thu, 30 Jul 2020 19:11:21 +0200
Bo Berglund via lazarus <[hidden email]> wrote:

>[...]
> When talking about project files, I wonder what is the advantage of
> adding the files into the project over just having them reside in the
> project source directory?
> I have noted that whenever I start a new unit in the IDE File menu
> this file gets added to the project along with the lpr file.

Well, some people put multiple projects into one folder, which
quickly can get messy. With the project units you and the IDE know
which files actually belong to the project.

There are several places in the IDE, where it makes a difference.
For example checking for duplicates and when moving an unit to another
folder the IDE can adjust the project's unit search path.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus code editor, how to show invisible tabs?

Free Pascal - Lazarus mailing list
On Thu, 30 Jul 2020 23:00:44 +0200, Mattias Gaertner via lazarus
<[hidden email]> wrote:

>Well, some people put multiple projects into one folder, which
>quickly can get messy. With the project units you and the IDE know
>which files actually belong to the project.
>
>There are several places in the IDE, where it makes a difference.
>For example checking for duplicates and when moving an unit to another
>folder the IDE can adjust the project's unit search path.

I found that when I added all of the files in my folder to the project
then the quick compile failed in a unit that had been ifdef:ed out so
it is not used in any of the other units.
The reason for the ifdef:s is that its functionality is an optional
add-on and heavily Windows-centric. But it is part of the project I am
porting from Delphi/Windows to FPC/Linux. It is to be handled when all
else works.

So Lazarus quick compiled it anyway.
When I removed it from the project again the quick compile succeeded.

So it seems like a unit that is part of the project is always checked
during compile even if it is not actually part of the project due to
ifdef:s...


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus