Can Gambas IDE remember last file / line edited?

New to Gambas? Post your questions here. No question is too silly or too simple.
sergioabreu
Regular
Posts: 112
Joined: Tue Jul 09, 2024 9:27 am

Can Gambas IDE remember last file / line edited?

Post by sergioabreu »

Hi

Does gambas allow to "memorize" where you stoped editing a project ?

For instance, when opening a Projetc, to load last tabs and go to at least the last file you worked on ?

Tks
User avatar
sholzy
Regular
Posts: 169
Joined: Sat Nov 26, 2016 2:52 am
Location: Florida

Re: Can Gambas IDE remember last file / line edited?

Post by sholzy »

The last tab opened and the line where the cursor was when the IDE was closed is the same for me when I open the project again. I'm assuming that is what you meant?
sholzy

You may start a journey with certain goals or objectives, but things don’t always turn out the way you expect them to.
sergioabreu
Regular
Posts: 112
Joined: Tue Jul 09, 2024 9:27 am

Re: Can Gambas IDE remember last file / line edited?

Post by sergioabreu »

In my case when I open a project it really loads the last file, that's true but not the last line where I was editing.

Example it opens main Class file but on its first line always

I ask it because some editors go to the exact last point you were. (Ex. vim)

It could be a nice feature request and actually is really easy to do, saving the last line in some file while closing gambas
User avatar
thatbruce
Regular
Posts: 295
Joined: Sat Sep 04, 2021 11:29 pm

Re: Can Gambas IDE remember last file / line edited?

Post by thatbruce »

We don't understand. The IDE opens with both the last open classes & forms and for classes etc. at the last line. It has done so since Vesuvius erupted.
Something at your end appears to be askew.
b
sergioabreu
Regular
Posts: 112
Joined: Tue Jul 09, 2024 9:27 am

Re: Can Gambas IDE remember last file / line edited?

Post by sergioabreu »

Yeah it might be a local issue

thanks
Poly
Newbie
Posts: 42
Joined: Sat Nov 02, 2024 11:10 am

Re: Can Gambas IDE remember last file / line edited?

Post by Poly »

sergioabreu wrote: Mon Apr 14, 2025 9:58 am
Example it opens main Class file but on its first line always
I have just tried it again.
For me, the last tab I edited really always opens at the point where I made the last change.
Provided, of course, that I have executed the finished code once or saved the project before opening another project or exiting the application.

So the problem must be with your installation, but I think more information would be needed.

best regards
Poly
User avatar
thatbruce
Regular
Posts: 295
Joined: Sat Sep 04, 2021 11:29 pm

Re: Can Gambas IDE remember last file / line edited?

Post by thatbruce »

Poly, I think you may just hit the nail on the head.

If the IDE crashes or is killed, for any reason not just an IDE bug, the project is not saved. Nor is the hidden file that saves the IDE state. That, I think is the issue here.

b
BruceSteers
Legend
Posts: 2110
Joined: Thu Jul 23, 2020 5:20 pm
Location: Isle of Wight

Re: Can Gambas IDE remember last file / line edited?

Post by BruceSteers »

Not only is the last active file tab opened and on the previous line, All other opened tabs remember the previous line/column each editor was on.

But "occasionally" like thatbruce says if the IDE crashes when saving a project the tabs/line info can be lost.

If you look at a projects .settings file you may see entries like this... (this is my GLauncher project)

Code: Select all

[OpenFile]
Count=16
Active=5
File[1]=".src/FMain.class:0.590"
File[2]=".src/FMain.form"
File[3]=".src/FGambasList.class:0.312"
File[4]=".src/FGambasList.form"
File[5]=".src/GProj.class:0.65"
File[6]=".src/Startup.module:0.6"
File[7]=".src/ClassMods/BFrame.class:0.0"
File[8]=".src/ClassMods/ListEditor/ListEd.class:0.140"
File[9]=".src/ClassMods/ListEditor/FListEd.class:0.120"
File[10]=".src/Classes/DBus/SingleInstance.class:0.0"
File[11]=".src/Classes/DBus/DBusComm.class:0.0"
File[12]=".src/Classes/ErrNo.class:56.13"
File[13]=".src/Classes/MenuView/FMenuView.form"
File[14]=".src/Classes/MenuView/FMenuView.class:8.47"
File[15]=".src/Classes/Set.class:0.8"
File[16]=".src/FSettings.class:0.0"
That is my list of opened tabs, each one (16 of them) contains the file path and then text files also have cursor column and row.
and tab 5 is the active one.
BruceSteers
Legend
Posts: 2110
Joined: Thu Jul 23, 2020 5:20 pm
Location: Isle of Wight

Re: Can Gambas IDE remember last file / line edited?

Post by BruceSteers »

another note. the files and positions are forgotten when saving a project if you have closed the tabs.

while a project is being edited you can close tabs/files and re-open them and they will open where you were.

but if you save and close the whole project only the currently opened tabs cursor positions are saved.
sergioabreu
Regular
Posts: 112
Joined: Tue Jul 09, 2024 9:27 am

Re: Can Gambas IDE remember last file / line edited?

Post by sergioabreu »

You can delete this topic, I found the error and it is not gambas fault.

It was caused by a script that deleted the .settings file (EDITED)

Everything is OK and FINE now :)
Post Reply