Bookmarks #6606
Replies: 8 comments 10 replies
-
I've genuinely never heard of bookmarks in an editor. Can you explain how this works? |
Beta Was this translation helpful? Give feedback.
-
Yes, these work like plaukiu said. You have an ability to selectively bookmark arbitrary lines in your project files. These are stored in project metadata so not lots across sessions. Bookmarked lines will normally have a bookmark icon in the gutter or different color line number so you can visually distinguish the marked lines. You can then quickly jump to these bookmarks via hotkey or from a fuzzy finder bookmarks list (sort of like Go To File fuzzy finder works). When jumping to a bookmark if the corresponding file is already open it will simply activate the tab and place cursor on the bookmarked line. Otherwise open the file in new tab and move cursor to bookmarked line. Normally you'd have key actions like:
It is very useful when you are concurrently editing a number of places far apart in the same buffer or in multiple buffers. Splits can help but you can only split so many times before the editor becomes too small and unusable. Hitting a hotkey to quickly jump between these places is much easier. Personally I think I can live w/o bookmarks in relatively small projects as it is not too hard to remember where is what. However in large projects with thousands of files and tens of large files open it is simply impossible to remember all the places I'm editing or inspecting. So what happens I keep repeatedly abusing Find in Project to look up the same places in the code over and over again. Rather than bookmark these places and quickly bounce between them via hotkey. Another exercise where I can't live without bookmarks are the large files. E.g. I often have to analyse some enormously large log files. You scroll through thousands of lines and find certain places of interest. Then if you want to revisit them you have to repeat the painfully slow search process all over again. Bookmarks would make it easy. |
Beta Was this translation helpful? Give feedback.
-
Simple bookmarks in Emacs: https://www.gnu.org/software/emacs/manual/html_node/emacs/Bookmarks.html |
Beta Was this translation helpful? Give feedback.
-
A related issue #5122. Vim support named marks (bookmarks IMHO) local to current buffer [a-z] and global book marks [A-Z]. |
Beta Was this translation helpful? Give feedback.
-
#13111 is the issue for the currently unsupported vim global marks; local marks are already supported in Zed. I imagine vim global marks could leverage some sort of generalized bookmark functionality. |
Beta Was this translation helpful? Give feedback.
-
another great example of 'bookmarks' is |
Beta Was this translation helpful? Give feedback.
-
As a workaround for not only being able to create a sort of jumplist and have "bookmarks" in minibuffers, I use a code comment (via code snippet keymap-ed shortcut) and a pinned global search tab. |
Beta Was this translation helpful? Give feedback.
-
Big fan of VSCode's Numbered Bookmarks. I find it critical for my workflow and the implementation appears to be rather simple. Any row deletion on a bookmarked row removes the bookmark. All other bookmarks in file where row number > deleted row number are offset by number of deleted rows. |
Beta Was this translation helpful? Give feedback.
-
In absence of plugins support, could the team perhaps consider adding in bookmarks as a core feature?
I only just discovered Zed and honestly can't put it down after installing. Liking a lot. There is just this one feature which makes it impossible to work with large code base projects. Even with fuzzy file finder it is still a big pain to bounce between large number of places in the code, impossible to keep all locations in memory.
Many editors have built-in bookmarks support. Visual Studio, Sublime Text, BBEdit, TextMate etc. All have built-in bookmarks. In others there will always be some community bookmarks plugins. It is kind of hard to survive without :(
Thanks
Beta Was this translation helpful? Give feedback.
All reactions