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

Add default key binding for file_picker_in_current_buffer_directory #10817

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markstos
Copy link
Contributor

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.

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Jun 15, 2024
@David-Else
Copy link
Contributor

I agree there should be a shortcut, but I think it should be space .

. means current directory. It seems the perfect choice when opening a buffer in 'the current directory', and as a bonus it is much easier to type.

"." = "file_picker_in_current_buffer_directory"

@markstos
Copy link
Contributor Author

Space dot works for me, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants