Emerald Editor Discussion
March 29, 2017, 11:54:03 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Save bookmarks  (Read 6614 times)
0 Members and 1 Guest are viewing this topic.
KjeBja
Senior Miner
***
Posts: 76


« on: January 15, 2007, 07:11:18 am »

When this forum was first created, there was some discussion on the subject of bookmarks. It seems that some people in the forum donít find them useful, but in my opinion the possibility to have bookmarks is an absolute must in any decent editor. Using them sensibly makes it easy to skip to and fro in a program, which is very useful when you are editing different parts of a program ďat the same timeĒ.

An extension to this feature would be much appreciated; namely the possibility to keep current bookmarks, so that they are available the next time the file is opened. For me, it would probably be sufficient to save bookmarks for files that are open when the editor is shut down.

I might also add that there have been a number of requests on this subject in the CE forum, and that Mr. Kang was indeed planning to include such a feature (http://www.crimsoneditor.com/english/board/CrazyWWWBoard.cgi?db=forum2&mode=read&num=5223&page=1&ftype=6&fval=bookmark&backdepth=1).
Logged
Szandor
Senior Miner
***
Posts: 92



« Reply #1 on: January 15, 2007, 02:49:50 pm »

I haven't used bookmarks in text files, although I think UE (UltraEdit) supports them. It sounds like one of those features that are dealbreakers for some if they're not present and totally unimportant for others.

If it is easy to incorporate we should have it. A small database would suffice, right? Every bookmark gets an entry on where the bookmark is located and in which file. This will produce a problem with missing files though. If the bookmarks aren't deleted, the database will only get bigger and bigger. Also, bookmarks would be stored along with the program, not the file. Probably a bad idea, forget about it.

Of course, if we use UTF-8 we could use a control character to set the bookmark. 0091 would be a good suggestion. This would make the bookmarks work with unicode only, but they would be saved along with the file.
Logged

"Cleverly disguised as an original signature..."
Matthew1344
Gem Cutter
****
Posts: 103


« Reply #2 on: January 15, 2007, 07:35:12 pm »

I second the motion, though I definitely wouldn't limit it to open files.  Sometimes I close one set of files to do something else, but then need to come back to the first set.  What about keeping bookmarks for files accessed within a user-defined amount of time (default=3 months) ? 

I wouldn't advise saving it with the file, because that would prevent bookmarking a read-only file, and it would force you to modify a file that you only want to set a bookmark for.

Logged
Arantor
Site Administrator
Administrator
Master Jeweller
*****
Posts: 618



« Reply #3 on: January 15, 2007, 08:01:22 pm »

I personally don't use bookmarks myself, I haven't really got the right mentality for bookmarks, although I really can see how a) I probably should get into the swing of using them in some environments and b) how it definitely can be a dealbreaker.

Part of me is thinking this would be a use for plugins but the more I think about it, the less I favour this approach - it should be including with the option to either disable it, or at stop it intruding into your own personal workflow.

I also agree on the "personal database" approach, and perhaps for the 3 months (or make it a user option?)

One question: what do you key bookmarks on? Line number or regexp string e.g. the occurance of 'function definethisspecialfunction()' is your bookmark? I can see how both might end up being useful.
Logged

"Cleverly disguised as a responsible adult!"
Feldon
Gem Cutter
****
Posts: 106


« Reply #4 on: January 15, 2007, 10:12:40 pm »

If it is easy to incorporate we should have it. A small database would suffice, right? Every bookmark gets an entry on where the bookmark is located and in which file. This will produce a problem with missing files though. If the bookmarks aren't deleted, the database will only get bigger and bigger. Also, bookmarks would be stored along with the program, not the file. Probably a bad idea, forget about it.

Of course, if we use UTF-8 we could use a control character to set the bookmark. 0091 would be a good suggestion. This would make the bookmarks work with unicode only, but they would be saved along with the file.
My first thought: If I were going to implement bookmarks in CE I would probably look to include them as part of project files.
Logged
John Yeung
Senior Miner
***
Posts: 85


« Reply #5 on: January 16, 2007, 02:33:42 am »

One question: what do you key bookmarks on? Line number or regexp string e.g. the occurance of 'function definethisspecialfunction()' is your bookmark? I can see how both might end up being useful.

I am also not a bookmark user.  However, I would imagine that if I were, the most accurate behavior for me would be as if it were an invisible (but revealable) character within the file.  So if I delete stuff above it, the bookmark automatically moves up; if I rename the function I have marked, the bookmark stays with that function, even though it can no longer be found using the same regular expression.  I guess this basically amounts to line number (or better still, character offset), with the proviso that it must be updated when text is inserted or deleted.

Obviously, it is no good to store bookmarks as actual embedded characters.  Besides the file-access issues Matthew1344 mentioned, there is the even more fundamental problem that the files would become Emerald-specific!  We can neither dictate nor predict how compilers or other editors would interpret them.

So wherever it is that we store bookmarks (how about in the Windows registry? Grin), I am thinking it would be best to store them as file positions, which would be read in during file loading and written out during file closing (if saving or if the file is unchanged since last save).  While in memory, they would behave as if embedded as I described above.

While the regex idea certainly has some merit, you can always have multiple instances of the same string in a file, so which one does the bookmark match?  (In practice, when I do want something like a bookmark, I will put a comment in the code with some string that I know is unique, and when I want to go back there, I search for the string.  Yeah, I know it's slower than using some key combination.  But it also saves my sieve-like brain from having to remember more key combinations for a feature I don't use often.)

John
Logged
ddlieber
Prospector
*
Posts: 3


« Reply #6 on: March 13, 2007, 03:18:11 pm »

I think this is along the lines of bookmarks, but I'm not positive.  I've been using CE for a couple years and I love it.  I recently started using Notepad++ because it provides the ability to collapse/fold code which I find very useful. I'm thrilled that it is a consideration for Emerald Editor.  But back to my original point....Notepad++ includes a Function list which shows a list of Functions and Procedures in the current document and allows you to jump directly to them.  I do a lot of SQL coding and would find this very helpful.  If this does not belong in the bookmark discussion, please let me know and I'll post it in the appropriate area.  Thanks!
Logged
KjeBja
Senior Miner
***
Posts: 76


« Reply #7 on: March 14, 2007, 07:24:14 am »

One question: what do you key bookmarks on? Line number or regexp string e.g. the occurance of 'function definethisspecialfunction()' is your bookmark? I can see how both might end up being useful.

I don't see EE as a word processor, so for me keeping bookmarks on the line number is sufficient. In CE, and in other text editors I know, you toggle bookmarks with Ctrl/F2, and jump between them with F2. Sticking to the CE way of doing it, the information you need to keep is almost the same as for the current line, just add the extra information that this is a bookmarked line, not necessarily the current one.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.128 seconds with 19 queries.