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

CLI argument to open file with cursor positioned on given line number #1106

Closed
jdnavarro opened this issue Nov 15, 2021 · 1 comment
Closed
Labels
C-enhancement Category: Improvements

Comments

@jdnavarro
Copy link

In kitty there is a feature to select and act on arbitrary text. I frequently use it with the --type=linenum option to open my editor with the cursor positioned on the reported error.

kitty_error_jump

I could get it working with helix if I could pass the line number as an argument when launching it from the shell.

$ hx +5008 helix-term/src/commands.rs

Being able to specify the column number would be nice, but not that important.

$ hx +5008:15 helix-term/src/commands.rs

Vim and Emacs use the + sign for the line number argument prefix, but I don't have an opinion about how it should be named, anything will do with me 😏

If this is something that aligns with the overall design of helix and you are willing to accept a PR for this feature, I could give it a try myself.

@jdnavarro jdnavarro added the C-enhancement Category: Improvements label Nov 15, 2021
@Omnikar
Copy link
Contributor

Omnikar commented Nov 15, 2021

@pickfire was working on this at #445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants