Sublime Forum

Bookmarks across files / stack traces

#1

Something I got used to in Eclipse was the ability to set bookmarks on multiple files and then navigate to them by clicking on them in a master list.

I would use this technique a lot when exploring a codebase that didn’t have symbol-references handy (such as jsp files, etc.)… in order to “trace” the flow of an app from configuration, through the controller, then to the bean or models, then to the view – I’d bookmark each context switch. Then after verifying/understanding the code, I could easily “unwind” the stack back up to inspect the next function.

An alternative would be to load a log file such that you could see the stacktrace in a buffer and click on any relative path files with line numbers and the text editor would open them on that line (such as in emacs). But I like the bookmarks across files idea better as it’s more flexible than a stacktrace and allows paths outside the stack to be ‘traced’ by hand ( yml configs -> ruby files -> javascript files , etc.), yet keep all these marks in their proper sequence.

Oh, and eclipse has a capability to add text to the mark so that you can describe it in the list.

0 Likes

#2

If there was an API exposing access to bookmarks, then a plugin could probably be written to provide global bookmark support.

Dan

0 Likes

#3

You can add your own bookmarks using add_regions: sublimetext.com/docs/2/api_reference.html

0 Likes

#4

I saw that shortly after I hit the submit button.

I might take a crack at implementing something like I did for a different editor I worked on.

0 Likes

#5

Also, the standard bookmarks are implemented via the regions API, you can access them via view.get_regions(“bookmarks”)

0 Likes

#6

I’m trying to workout a good UI for the global mark plugin that I’m working on. What I’d like to do is to use the show_quick_panel to show the available global marks. This will allow typing in a number and/or mark name and to go to the mark. I’d also like to use the same interface to manage marks, i.e. type in new mark information, hit the key and have the quick_panel close but give me access to the text that was typed in so that a new mark could be dropped. Also it would be nice to allow other keys, such as Alt+d etc to close the quick_panel so that the selected mark could be deleted. Is this something that can currently be done or easily added?

Dan

0 Likes