Saving the last position in a file

General and specific configuration/INI settings

Saving the last position in a file

Postby johnmuir » Thu Jul 12, 2007 11:54 am

Is there any way to configure UE to remember the last position of the cursor in a file, so that when the file is opened again you are back at the same place you left it previously?

Many other editors do this, eg. jEdit where it's called saving the caret position or even the old Programmers File Editor (pfe32.exe) could do it.

Surely UE can do this... only I can't find it anywhere in the documentation or in the forum.

Thanks in advance, john
User avatar
johnmuir
Newbie
 
Posts: 4
Joined: Wed Jul 11, 2007 11:00 pm

Re: Saving the last position in a file

Postby jorrasdk » Thu Jul 12, 2007 12:30 pm

Not sure if the following behaviour is exactly what jEdit/pfe32 offered, but in Advanced - Configuration - File handling - Load I have checked "reload files previously open on startup" and I find that UE not only opens the files that were active when I closed it, but it also restores the last cursor position in these files.

Edit:
If you want to save some "state information" of files you close yourself (i.e. cursor position) consider setting a bookmark and in Advanced - Configuration - Editor - Bookmarks check:
  • Save bookmarks
  • Bookmark column with line
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Saving the last position in a file

Postby johnmuir » Thu Jul 12, 2007 1:02 pm

Thanks for the info about the reloading and bookmarks but that's not it. I tried them out but...

the cursor ought to automatically go to the position in the file where it was when I last closed the file.
User avatar
johnmuir
Newbie
 
Posts: 4
Joined: Wed Jul 11, 2007 11:00 pm

Re: Saving the last position in a file

Postby Mofi » Thu Jul 12, 2007 2:01 pm

johnmuir wrote:The cursor automatically go to the position in the file where it was when I last closed the file.

And what do you want?

When file x is open with cursor at line 5 column 2 and a file y is also open with cursor at line 5000 column 80 and you close UltraEdit and restart it, where should the cursor be after restart and re-opening the files?
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Saving the last position in a file

Postby Andreas » Fri Jul 13, 2007 9:53 am

I think he means he wants remembered positions anytime he re-opens a file, not just when closing it together with UE and auto-re-opening it when restarting UE.
User avatar
Andreas
Basic User
Basic User
 
Posts: 10
Joined: Thu Jul 15, 2004 11:00 pm
Location: PAF, Germany

Re: Saving the last position in a file

Postby jorrasdk » Fri Jul 13, 2007 10:12 am

Yes, I think Andreas' guess is correct.

But just imagine how big the uedit32.INI file would get if line number/column together with the full file path of every closed file should be stored in the INI. You might open thousands of files over time. UE would have to have some kind of "time out" on these stored states of files opened long time ago to avoid the INI growing to MB-size.

Using bookmarks and storing them in the INI seems a more deliberate action. There is always the possibility to automate some bookmark actions with macros.

But anyways, johnmuir could always suggest it as a new feature to IDM support (preferably as an configurable option).
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Saving the last position in a file

Postby Mofi » Fri Jul 13, 2007 10:35 am

Ah, that could be. I completely agree with jorrasdk: such an option would increase either my INI or my registry in just 6 months to several MBs of useless data because most files I edit with UltraEdit has a lifetime of just a few minutes/hours. It would be completely useless to save the cursor position on file close for all files I have ever edited.

But it would be a good project/workspace option. When working with a project/workspace the number of files are often limited and there it would be a good idea to remember the last cursor position on every file close for the files in the project.prj file.

At least for the specified files in the project file, it would not be a big problem to add line and column number information to every file.

Project files not explicitly added to the project using the folder method are more difficult to handle, because the file names of such project files are not saved in the project file. But maybe for such projects (mainly whole websites) with hundreds or thousands of files such a "remember cursor position on file close" is not really needed.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Saving the last position in a file

Postby johnmuir » Fri Jul 13, 2007 11:02 am

Hello, I see you have understood what is required. The other programs obviously don't let the configuration files grow too big (although don't you also have an 320 GB drive?) They limit the number of remembered file positions to some useful number like 50 or 100. That's not a killer problem.

OK, I take it everyone wants this feature to be added to UltraEdit, so...

How do we go about getting it? Anyone with influence listening in on this topic?
User avatar
johnmuir
Newbie
 
Posts: 4
Joined: Wed Jul 11, 2007 11:00 pm

Re: Saving the last position in a file

Postby jorrasdk » Fri Jul 13, 2007 11:09 am

No, we can't expect IDM to listen in as this is only a user-to-user forum, but you take the essence of what have been discussed and send it as a feature request to IDM Support (e-mail address at the top of the page).
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Saving the last position in a file

Postby johnmuir » Fri Jul 13, 2007 11:21 am

Thanks, I've done just that ;-)
User avatar
johnmuir
Newbie
 
Posts: 4
Joined: Wed Jul 11, 2007 11:00 pm

Re: Saving the last position in a file

Postby ultra » Sat Sep 08, 2007 6:33 pm

Any updates about this feature?
I love this feature from my old editor and really miss it in UltraEdit!

Did anyone wrote a feature request to the support?
User avatar
ultra
Basic User
Basic User
 
Posts: 33
Joined: Tue Jul 13, 2004 11:00 pm

Re: Saving the last position in a file

Postby highend » Fri Oct 28, 2011 9:21 pm

I know this thread is 4 years old but I'd like to ask again if nothing's changed over the years?

I'm coming from EditPlus which has this feature and I really miss this in UE.

EditPlus saves these information in an .ini file like:

[Restore]
Count=50
[Restore\0]
File=D:\Tools\UltraEdit\Data\wordfiles\xyplorer.uew
Converter=1252
Date High=30184821
Date Low=-565833548
Line=44
Index=13
[Restore\1]
...

Atm it contains 50 entries and the file is about 17kb large.

Do I have to send in a feature request for this one?
highend
Basic User
Basic User
 
Posts: 12
Joined: Tue Oct 25, 2011 10:33 pm

Re: Saving the last position in a file

Postby Mofi » Sat Oct 29, 2011 6:42 am

highend wrote:Do I have to send in a feature request for this one?

Yes, that you have to do because such a feature is still not available. UltraEdit v17.30 saves and restores current position in files only for those files which are open on exit of UltraEdit or for projects/workspaces on close of the project/workspace, but not for last X files opened once in the past.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Saving the last position in a file

Postby highend » Sun Oct 30, 2011 5:24 pm

Thanks,

I'll request that feature (including the possibility that the explorer tree view is able to follow the current tab's directory) tomorrow via e-mail.

Regards,
Highend
highend
Basic User
Basic User
 
Posts: 12
Joined: Tue Oct 25, 2011 10:33 pm


Return to Configuration/INI Settings

cron