-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[BUG] Go to file is capturing surrounding single quotes #4122
Comments
Is removing quotes/double quotes from the selection an acceptable approach here? I wonder if it makes sense to have something "smarter" at work here. In this example one could have |
In this particular case I think it's okay to Do It Like Neovim™. It's just too common to drop a cursor on the line |
When there's only a single cursor with a selection width of 1, the current LONG word is considered as the filename, so it's similar to doing helix/helix-term/src/commands.rs Lines 1028 to 1044 in 7f75458
We could trim surround character pairs like
Cases like these are better handled by the LSP that has the additional context at hand to resolve the path reliably. |
The functions trims surrounding `'`, `"`, `(` and `)` before opening the path. The `current_word` selection was inverted so that now it works from both the first and last characters of the word.
The functions trims surrounding `'`, `"`, `(` and `)` before opening the path. The `current_word` selection was inverted so that now it works from both the first and last characters of the word.
files
consider a file
example.js
that contains the lineimport './index.js'
orimport 'index.js'
You cannot navigate to
index.js
by usinggf
on either lineWhat's interesting is you can manually select
index.js
and hitgf
and it works.It looks like
gf
is capturing the surrounding single quotes. Neovim does not exhibit that behavior.So in Helix you have to
mi'gf
and in Neovim you dogf
The text was updated successfully, but these errors were encountered: