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

Badly documented :goto_file #8563

Closed
nandoflorestan opened this issue Oct 18, 2023 · 1 comment · Fixed by #9001
Closed

Badly documented :goto_file #8563

nandoflorestan opened this issue Oct 18, 2023 · 1 comment · Fixed by #9001

Comments

@nandoflorestan
Copy link

The :goto_file command (gf) is documented as:

"Go to files in the selection"

https://docs.helix-editor.com/keymap.html?highlight=goto#goto-mode

The same string is present in the helix editor itself.

The problem is the plural. The command only opens a single file, not multiple files. This gave me the wrong idea, I thought I would be able to select multiple lines of text and open multiple files from that. When it didn't work I tried multiple separators: comma, colon, semicolon... I finally realized it wouldn't do what I wanted.

That "s" cost me a long time. Please remove it.

That's all for the bug report. Now just a bit of further discussion:

I usually open the same files every day. I thought of opening them all from the command line, but then I can't open the project at the same time in helix with "hx .". It seems to be either project or file(s). That's also bad, I suppose.

@the-mikedavis
Copy link
Member

It can open multiple files if you have multiple selections so a better wording could be "Go to file in each selection". For example if you have multiple file names separated by lines, select all of the files and then use A-s to split on newlines and then use gf you will open each file under each selection. Or if they're separated by , you can select them all and use S,<ret> to split by commas.

Docs are here and here if you'd like to change them, please send a PR.

jw013 added a commit to jw013/helix that referenced this issue Dec 5, 2023
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
@the-mikedavis the-mikedavis linked a pull request Dec 5, 2023 that will close this issue
pascalkuthe pushed a commit that referenced this issue Jan 8, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
woojiq pushed a commit to woojiq/helix that referenced this issue Jan 13, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
dgkf pushed a commit to dgkf/helix that referenced this issue Jan 30, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 2, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
Vulpesx pushed a commit to Vulpesx/helix that referenced this issue Jun 7, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
smortime pushed a commit to smortime/helix that referenced this issue Jul 10, 2024
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants