Can Gambas IDE remember last file / line edited?
Posted
#1
(In Topic #1458)
Regular

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
Posted
Administrator

Posted
Regular

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
Posted
Regular

Something at your end appears to be askew.
b
Posted
Regular

thanks
Posted
Expert

sergioabreu said
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
Posted
Regular

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
Posted
Guru

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
[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.
Posted
Guru

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.
Posted
Regular

It was caused by a script that deleted the <COLOR color="#FF0000">.settings</COLOR> file (EDITED)
Everything is OK and FINE now
Posted
Administrator

Someone in the future might find this thread useful.
Posted
Guru

sergioabreu said
You can delete this topic, I found the error and it is not gambas fault.
It was caused by a script that deleted the .project file
Everything is OK and FINE now
That's weird because the data is stored in .settings file not .project.
If you delete a .project file then gambas will no longer recognize the folder or load the project at all. :?
Posted
Regular

BruceSteers said
sergioabreu said
You can delete this topic, I found the error and it is not gambas fault.
It was caused by a script that deleted the .project file
Everything is OK and FINE now
That's weird because the data is stored in .settings file not .project.
If you delete a .project file then gambas will no longer recognize the folder or load the project at all. :?
I meant SETTINGS really. You are RIGHT
1 guest and 0 members have just viewed this.
