Skip to content
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

Single numbering system across files #6

Closed
geoffroy-noel-ddh opened this issue Apr 22, 2016 · 22 comments
Closed

Single numbering system across files #6

geoffroy-noel-ddh opened this issue Apr 22, 2016 · 22 comments
Milestone

Comments

@geoffroy-noel-ddh
Copy link

geoffroy-noel-ddh commented Apr 22, 2016

It would be great if there was a settings to allow the bookmark numbers to work across files. By that I mean that there is only one Bookmark 1 at any time across all your files. If you go to another file and do CTRL+SHIFT+1 it replaces the previous one. If you go to another file and press CTRL+1 it jumps back to file where you last set bookmark 1.

I seem to remember that the Borland IDE worked that way. The Quick Bookmark plug-in for Eclipse, which I use all the time, also does it that way.

@alefragnani
Copy link
Owner

I don't remember this behavior in Borland Delphi, and had used Eclipse a few times, using only it's default plugins. But that's an idea 👍 .

@geoffroy-noel-ddh
Copy link
Author

geoffroy-noel-ddh commented Apr 25, 2016

Cool, and thanks for the work on this plug in, looks promising.

@Avijobo
Copy link

Avijobo commented Nov 24, 2016

Yes, please... it would be very convenient to spread the 9 bookmarks across different files in the project and to be able to jump to them instantaneously with CTRL+num ... This feature used to exist in older IDE's but seems to be forgotten by most recent ones. However once you're used to this, you can't live without it anymore... ;-)

@qrti
Copy link

qrti commented Jan 20, 2017

Yes, I would like this too, UltradEdit also shows this behavior.
A flag like in alefragnani.Bookmarks would be fine.

"bookmarks.navigateThroughAllFiles": true

@dudeNumber4
Copy link

Thanks for the work, but I've never used bookmarks in any IDE that didn't work across files. Can there be any other point in using them?

@alefragnani
Copy link
Owner

@dudeNumber4 thanks, but as described in readme, this extension was made to be in Delphi style, and it is how it works now 😄 . Delphi has been my main IDE from most of my development days.

I'm focusing on other projects right now, but I pretend to come back to this one soon and make some improvements... This enhancement is on top of the list...

@dudeNumber4
Copy link

Delphi - exactly. Used it for years. The IDE had no built-in numbered bookmarks that I remember, but I used an extension that numbered them across files. Again, thanks for the work, but I really can't see a use for numbered bookmarks except that they cross files.

@Thinkscape
Copy link

Thinkscape commented Apr 18, 2017

That brings it in line with IDEA, which I'm coming from.
All the bookmarks are global for a project.
https://www.jetbrains.com/help/idea/2017.1/navigating-with-bookmarks.html

Current per-file bookmarks are quite useless for me, sadly.

@alefragnani alefragnani added this to the 0.9.0 milestone Apr 19, 2017
@alefragnani
Copy link
Owner

Personally, only 9 bookmarks for the entire project seems too limited for me. Sometimes even 9 bookmarks per file was already a problem 😄.

But I see the point. Being able to replace the already existing bookmark from another file, and navigating to another file with one bookmark is faster than using the List from All Files command.

I will add another setting navigateThroughAllFiles with this possible values:

  • false: default - same behavior as today
  • replace: you can not have the same numbered bookmark in different files, just like the original request
  • allowDuplicates: you still can have the same numbered bookmark in different files, and it will cycle through the same numbered bookmark from different files

@Thinkscape
Copy link

Thinkscape commented Apr 21, 2017 via email

@dudeNumber4
Copy link

allowDuplicates: you still can have the same numbered bookmark in different files, and it will cycle through the same numbered bookmark from different files

Nice! I've never seen that feature.

@alefragnani
Copy link
Owner

Me neither 😂

@alefragnani
Copy link
Owner

Just released version 0.9.0:

For those that want a single numbering system, like the original request, just set "navigateThroughAllFiles": "replace".
For those that want to try out a mixed mode, use "navigateThroughAllFiles": "allowDuplicates".

Hope you enjoy 😁

@montgomerybc
Copy link

Bravo. I too am used to the "replace" style behavior from my Brief / CodeWright (another Borland IDE which I still use)

@tkehayov
Copy link

tkehayov commented Dec 5, 2020

Where did you put these settings?

@alefragnani
Copy link
Owner

Hi @tkehayov ,

You can choose between User or Workspace settings. Just follow the VSCode documentation (https://code.visualstudio.com/docs/getstarted/settings) and you are good to go 😉

Hope this helps

@TheNicker
Copy link

TheNicker commented Sep 17, 2021

I'm trying to migrate to VSCode, and part of my setup is numbered bookmarks.

The numbered bookmarks in the old school editors (probably in the latest Delphi as well) and in the DPack plugin for visual studio are using two sets of numbered bookmarks in any given context. local [0-9] per file, and global [0-9] per workspace.

Local bookmark key bindings

Toggle bookmark 1 - Ctrl + Shift + 1
Goto bookmark 1 - Ctrl + 1

Global bookmark key bindings

Toggle global bookmark 1 - Ctrl + Alt + Shift + 1
Goto global bookmark 1 - Ctrl + Alt + 1

I believe the original solution it's better.
If approved, please reopen the issue.

@alefragnani
Copy link
Owner

Hi @TheNicker ,

I never used DPack, and have little experience in VS, so I never experienced this local and global bookmarks approach.

But, your request is a different issue and, in fact, I'm wondering if it wouldn't be, a new extension. Mostly because you are creating a new set of commands (local and global) which would also require a new set of icons and customization settings. Even so, not that hard.

Feel free to open a new issue, providing more details like screenshots of VS DPack. Let's see how other users react.

Hope this helps.

@TheNicker
Copy link

Hello @alefragnani,
At the creation of this issue the author @geoffroy-noel-ddh wrote:

I seem to remember that the Borland IDE worked that way

Borland approach is the local/global approach for about 15 years, maybe more. It has been a great feature so implementations for other IDEs exist internally or via extension. It's old and well known.

Due to that I assume that the requested feature is to have the functionality of Borland bookmarks.

If that's the case then this feature hasn't been implemented according to specifications. That's why I commented on this thread.

I believe a new issue would be somewhat a semi duplicate.

Nevertheless, if you still think a new issue would be better while taking into consideration other variables, please comment.

Either way is good for me.

@alefragnani
Copy link
Owner

Hi @TheNicker ,

I’m not sure which Delphi release you used, or which plugins you had install (GExperts, CnWizads or any other), but I’ve been using Delphi for more than two decades (skipping a few releases), and never noticed the behavior originally requested.

Back then, I didn’t find any official documentation describing the alleged behavior, nor the original author linked any Borland/Inprise/CodeGear/Embarcadero documentation and/or screenshots/videos describing it. Even though, I added the requested feature, with a plus, the allowDuplicates option.

If you have those documentations, I would be glad to see. Not only I could add a reference in Readme file (so other users would be aware), but also learn how it stores the bookmarks, for an incoming import feature I was planning.

And yes, I prefer a separate issue for you DPack behavior, with details like references, screenshots, videos.

Thank you

@TheNicker
Copy link

@alefragnani, due to the conviction in your argument I've installed an old version of a Delphi IDE. it seems that there's no global bookmarks out of the box, though I clearly remember using that feature, but that was in 2007. It might was an addon or an utter hallucination 😉, not sure anymore.

Continued at #118 is an attempt to provide hopefully, a more robust and generalized solution than any of the discussed so far.

@elbek
Copy link

elbek commented Feb 7, 2023

I feel like replace should be default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants