Tapatalk

Saving the last position in a file

Saving the last position in a file

4
NewbieNewbie
4

    Jul 12, 2007#1

    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

    262
    MasterMaster
    262

      Jul 12, 2007#2

      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

      4
      NewbieNewbie
      4

        Jul 12, 2007#3

        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.

        6,685587
        Grand MasterGrand Master
        6,685587

          Jul 12, 2007#4

          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?
          Best regards from an UC/UE/UES for Windows user from Austria

          10
          Basic UserBasic User
          10

            Jul 13, 2007#5

            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.

            262
            MasterMaster
            262

              Jul 13, 2007#6

              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).

              6,685587
              Grand MasterGrand Master
              6,685587

                Jul 13, 2007#7

                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.
                Best regards from an UC/UE/UES for Windows user from Austria

                4
                NewbieNewbie
                4

                  Jul 13, 2007#8

                  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?

                  262
                  MasterMaster
                  262

                    Jul 13, 2007#9

                    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).

                    4
                    NewbieNewbie
                    4

                      Jul 13, 2007#10

                      Thanks, I've done just that ;-)

                      33
                      Basic UserBasic User
                      33

                        Sep 08, 2007#11

                        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?

                        12
                        Basic UserBasic User
                        12

                          Oct 29, 2011#12

                          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?

                          6,685587
                          Grand MasterGrand Master
                          6,685587

                            Oct 29, 2011#13

                            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.

                            12
                            Basic UserBasic User
                            12

                              Oct 30, 2011#14

                              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