Sublime Forum

Bookmark window?

#1

Revisiting Sublime after years of not using it, and I see that while there is a way to bookmark my code, there is no way to see my bookmarks, like, in a bookmark window, making bookmarking even more cumbersome to use than just searching for a comment like ‘// this is a bookmark’. Is there a way to have such a window? If not, is it too complicated to write such a plugin? Or does everyone just press F2 a dozen times until they get to their desired bookmark, or click “Goto->Bookmarks->view all bookmarks”?

0 Likes

#2

Bookmarks are just regions of code, which can be quieried via view.get_regions('bookmarks') API call. I guess it would be easy to write a quick panel to list all those regions, just like the “Goto Symbol” quick panel does.

0 Likes

#3

The classic Visual Studio has/had a panel at the bottom of the window listing all bookmarked lines in the whole project. Quite similar to Find-in-Files Results. That would indeed be nice.

bookmark-window

0 Likes

#4

I use Sublime ViewBoomarks. It is a simple package, but does what you want. There are other user-developed packages out there as well, but I have not tested them.

2 Likes

#5

I ended up writing my own plug-in that uses structured comments as bookmarks that can be looked up and navigated to via a panel. I like that this way the bookmarks are persistent and not tied to sublime.

I’ve put it up on Package control: “CommentMark”. It’s dumb and simple but gets the job done for me.

0 Likes