[TxMt] interesting bookmark behavior
Ralph Pöllath
lists at poellath.org
Wed Mar 9 11:52:56 UTC 2005
On 09.03.2005, at 11:14, Allan Odgaard wrote:
> On Mar 8, 2005, at 20:49, Lang Riley wrote:
>> Just want to throw this out there: (1) place bookmark in file at the
>> signature of a Ruby method (2) comment out the whole method displaces
>> the bookmark so that it now moves itself to be after the commented
>> out code? Seems strange to me. Feature or bug? I love bookmarks
>> though : )
>
> Unfortunately when running a transformation (like a command) on the
> selection, there isn't any easy way for me to keep the location of
> meta-data (like bookmarks).
>
> I guess I could look into some heuristics, like when the number of
> lines are the same, it should re-use line numbers etc. -- but it's
> unfortunately not that simple to implement, and it'll always be very
> easy to break whatever I come up with...
Just thinking out loud..
Maybe you could store the actual information as a special character
attribute (an invisible style, if you like) and just display a bookmark
symbol in every line that contains such characters.
What are the semantics of a bookmark? Does a bookmark mark a line
number? Or the actual content of a line?
As I mentioned before, I think that automatic bookmarks (based on
language-specific regex) are way superior to custom bookmarks: Their
behaviour is well-defined, and they can be calculated on the fly (no
need to store file metadata).
Cheers,
-Ralph.
More information about the textmate
mailing list