Add default key binding for file_picker_in_current_buffer_directory #10817
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening the file picker relative the current buffer is a useful command without a default binding.
This PR binds it to % by default, where % is a mnemonic to relate the name of the register
holding the current file name. This does not conflict with any other default bindings.
Previously, a default binding for this command was discussed in:
#3052
At the bottom, an example of how to bind a key to this feature gained 25 hearts:
#3052 (comment)
Clearly it's a feature that users are interested in discovering.
While this does at one more item to the popular "space" menu, opening other files is one of the most
common editor actions.
This binding arguably adds more value than file_picker_in_current_directory, as the current directory is likely to equal the workspace root, and file_picker seems to fallback to
the current directory if there's no LSP root if I understand correctly.
By contrast, the location of the current buffer will vary all over the source tree, it seems
fairly common to work wither files nearby in tree.