New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] - "Sticky" bookmarks that move if lines are inserted or removed in file. #652
Comments
Hi @robross0606 , The bookmarks will (should) move up/down based on the edits you do in the text. If you add a new line, the bookmarks goes down. If you remove a line, the bookmarks goes up. But, if you edit the files outside VS Code, pull changes from remotes, or change branches in git, these changes are not loaded, and the bookmarks will remain in the original line. If you are editing the file in VS Code and the bookmarks are not updated please, provide more details about your steps. It should work. Sure, there are a few scenarios where this is not perfect, but it works in most cases. If you are editing outside VS Code, I'm sorry to say, but these changes aren't recognized. At least not without a reenginering on how the extension works. Hope this helps |
I’m really surprised to hear this because I am not editing outside vsCode and I don’t think I have ever seen a bookmark move with code changes. I’ll do some more specific tests next week. A couple possibilities:
|
The bookmarks extension depends entirely on the editor changes events, fired by VS Code, and yes, other extensions may interfere. For instance, up until 2 years ago, formatters like Prettier and multi-cursor operations weren’t supported. I updated the extension and it started to work just fine. Maybe something on their side has changed and the events are not firing as expected, and since I don’t use prettier, I didn’t noticed. The other possibilities you listed, doesn’t affect how the extension work. Is the sticky behavior bullet proof? No, it isn’t. There are some edge cases where it doesn’t work as expected, and still needs improvement. But it should work most of the times. Hope this helps |
Thanks for the info. I'll keep this in mind and see if I can better qualify the behavior I'm seeing. |
Just double checked this and I cannot get the bookmark to be "sticky" at all on any type of file. Mostly I'm working with Javascript files but I also tried a simple README.md file and the bookmark stays put on the line where it was marked in every file I've tried. If it helps, here is a list of all the extension I have installed right now:
|
This tool is really useful, but seems to be missing bookmarks that stay in sync with edited files. Removing or adding lines to a bookmarked file leaves the bookmarks where they are placed, which means they're out of sync with where they were intended. The line # is usually less important than the content on the line which was bookmarked.
The text was updated successfully, but these errors were encountered: