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

Ability to navigate to bookmarks in other files #8

Closed
damiensawyer opened this issue Nov 18, 2015 · 9 comments
Closed

Ability to navigate to bookmarks in other files #8

damiensawyer opened this issue Nov 18, 2015 · 9 comments
Assignees
Milestone

Comments

@damiensawyer
Copy link

Hi,

Unless I'm missing something, it appears that executing "Jump to Next" or "Jump to Previous" only includes bookmarks in the same file. In Visual Studio 'full', the feature will include bookmarks across all files. This is extremely useful in large projects.

Do you think that this is this something very difficult to achieve? If you don't, then I'm open to helping.

Kind regards and thanks for the plug-in.

@alefragnani
Copy link
Owner

Hi, thank you..

You are right. It is currently available only for the current file.

I started to code the issue #5, and decided to create another one to expand to list from all files, It doesn't appears to be difficult to achieve, but then two questions appeared:

  1. Which order of files should be used? The next/previous focused; alphabetic?
  2. Which order of bookmark should be used when moving to another file? From file beginning/ending; previous cursor position?

What do you think?

@damiensawyer
Copy link
Author

Hi, thanks for this.

These are good questions. The easy answer might be (for both) to sort the files alphabetically and then by order of bookmarks. Another option I was pondering might be to list/navigate to the tags in the order that they were created - kind of like a queue.

I think that my preference for the list would be to have the files alphabetically and then by line number. I think that this would enable the fastest 'scanning' of it.

With the previous / next navigation, I think that I like the queue idea. The reason being, when you're coding, that's kind of the order you're thinking about them. Pressing 'previous' will then allow you to step back through your code in the reverse order that you were working on it

I'll try and find some time to read the doc on vscode extensions and use your project to study. :-)

@alefragnani
Copy link
Owner

Great!

Feel free to take a look at the code and send pull request if you like. I want to finish issues #5 and #4 before working with multiples files.

Thanks for your help

@alefragnani alefragnani added this to the Navigation enhancements milestone Nov 26, 2015
@alefragnani alefragnani self-assigned this Jan 21, 2016
@alefragnani
Copy link
Owner

🏃

@mattmazzola
Copy link

I assume this was implemented since the issue was added to a milestone and closed but I'm still not seeing how to use it.

I know of the Ctrl Alt L or K shortcut and see these commands:
image

As said about the Jump to Next and Previous only go within the same file.

The only way I can work around this is too use the Bookmark View on the left and click them or by using the Bookmarks: List from All Files command and then using the arrow keys.

Is there another way? Perhaps a new shortcut lilke Ctrl Shift Alt J that does all files?

@alefragnani
Copy link
Owner

Hi @mattmazzola ,

Yes, it's already possible, but there is a User Setting for that. Just add "bookmarks.navigateThroughAllFiles": true and voilà

The issue #102 will change the default value to this setting to true, but it is not on the roadmap yet.

Hope this helps

@mattmazzola
Copy link

Ok, thanks so much! It makes this extension much more useful for me as I often only needed the bookmarks when they were in different files and using the VSCode breadcrumbs wasn't sufficient.

For the VS Code users who show their user settings in the graphical view it looks like this:
image

@davidysoards
Copy link

set this to FALSE if you want to DISABLE this behavior, took me a minute to figure this out

"bookmarks.navigateThroughAllFiles": false

@joelmellon
Copy link

Yes, it's already possible, but there is a User Setting for that. Just add "bookmarks.navigateThroughAllFiles": true and voilà

Thank you @alefragnani! This is now the default in VSCode and I wanted to opposite functionality. Believe it or not this answer was quite difficult to find. 🍻

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

5 participants