[TxMt] bookmarks/history bundle idea

Jay Soffian jay-txmt at soffian.org
Sat Nov 11 22:17:22 UTC 2006


I have a half-baked idea for a bundle and I wanted to solicit  
feedback in an attempt to more fully bake it.

When coding I commonly find myself jumping around not only within a  
file but often between files. Typically to do this I'm either using  
the CTags bundle or cmd-E, cmd-shift-F, click in the find window,  
look at something, then try to figure out where I was. I find myself  
expending way too much mental effort trying to remember where I am at  
any point in time.

My idea is for a module which allows you to set global bookmarks per  
project along with history as you follow the bookmarks. The bookmarks  
would be persisted via a file in the project root called .tmbookmarks  
or some such. The bundle would have these actions:

- add bookmark (also places bookmark on top of history)
- show bookmarks
- delete bookmark (presents list of bookmarks, select to delete one  
or more)
- clear bookmarks (deletes all bookmarks)
- show history
- go back (returns to most recently added/followed bookmark)
- go forward
- clear history

The bookmarks/history would be presented either via tmdialog or  
simply as an HTML window (similar to CTags's navigation window).

The forward/back would be a browser-type history that is populated as  
you click thru your bookmarks. I'd like to tie the history into the  
CTags bundle as well.

So for example, you could do something like:

- add bookmark (this would add the current file/line)
- cmd-e, cmd-shift-f, click to new file.
- go back (this would save the current file/line then jump back to  
the just added bookmark)

I have to think a bit more about how the bookmarks/history will  
interact. It might be better to have the history work more like a  
shell's pushd/popd actions.

Also, obviously as you edit a file your bookmarks end up pointing to  
the wrong line. However, I have this crazy idea that I can save two  
or three lines of context with each bookmark (a la diff) so that when  
following a bookmark I can validate it and resync automatically (a la  
patch).

Thoughts?

j.



More information about the textmate mailing list