[TxMt] Bookmarks

Charles Miller cmiller at pastiche.org
Fri Jan 28 05:31:38 UTC 2005


On 27/01/2005, at 10:19 PM, Ralph Pöllath wrote:
> IMO, bookmarks cannot be implemented properly (go ahead Allan, prove 
> me wrong :-). Automatic bookmarks (that "boomark" each line matching a 
> certain pattern), would be much more useful.

It's a common misconception that if there are significant situations in 
which some idea won't work, it's "impossible". Often, though, having 
something work most of the time is still better than not having it at 
all.

* Store bookmarks in the project as line number, and some of the 
context surrounding the bookmark.
* If, on loading the file, the number and context don't match, start 
looking up and down for the first line that matches the saved context 
to a certain degree of tolerance.
* If some bookmarks are still unaccounted for, delete them and pop up a 
dialog saying "This file was modified since it was last opened in 
[[Project Name]]. Some of your bookmarks have been removed."

Under certain circumstances this would lead to bookmarks being lost (or 
even moved), but it would work well enough for 90% of cases.

Charles Miller

-- 
Unix: gives you enough rope to shoot yourself in the foot.
cmiller at pastiche.org            http://fishbowl.pastiche.org/




More information about the textmate mailing list