bookmarks with descriptions?

Is there a plugin or functionality in PHPStorm that would allow to:

  • make a bookmark connected to function name rather than to line number (because they change often with updates)
  • add a long description to the bookmark
  • list those bookmarks, search the descriptions for a word and open related place in code with one click

I know there are mnemonic bookmarks, but that's not enough for my purpose of making a kind of "table of contents" or a "list of interesting places" in code of a large 3rd party project. Mnemonics are too cryptic, I need a few words of descriptions.

5 comments

> make a bookmark connected to function name rather than to line number (because they change often with updates)

It totally makes sense, moreover this functionality is present in IDEA, I don't know why we didn't tranfer it. Please feel free to submit a feature request: https://youtrack.jetbrains.com/issues?q=project%3A+PhpStorm#newissue

> add a long description to the bookmark

What do you mean by 'long description'? How many characters do you need there?

> list those bookmarks, search the descriptions for a word and open related place in code with one click

You can search bookmarks by typing in the Favorites tool window.

0

By long description I meant in fact a few sentences. Not too elaborate (existing phpdoc is for details) but enough to put all keywords and necessary information in a meaningful way. Maybe 255 characters would be enough.

The favourites window is ok except that it lists file names and not descriptions. If there were a list of descriptions then the existing search functionality would suffice.

0

It's not just a filename. This field is pre-filled with a filename, however it's a description field, so you can write anything down there (rightclick | Edit description).
To be honest, I personally do not find it convenient, so please vote here: https://youtrack.jetbrains.com/issue/IDEA-90269
And also here: https://youtrack.jetbrains.com/issue/IDEA-63028

0

On a related note, it would be good if there was an action for editing the description of the current line's bookmark. So user wouldn't have to go find the entry in the Bookmarks Tool to edit the description.

For the described use case it would allow the user add a custom named bookmark with two keystrokes and no window changes - one to create the bookmark and one to edit the bookmark's description. The whole process could be scripted easily also.

It also would make it easy for a user to update the description (perhaps with more notes/thoughts).

0

Please sign in to leave a comment.