You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you can add :line_number at the end of a file name to open it at a specific line
hx LICENSE:4
The above opens LICENSE file at line 4. LICENSE:6:3 would open it at line 6, column 3.
What if I want to open LICENSE file at line 4 and line 6 column 3, two buffers for the same file?
hx LICENSE:4 LICENSE:6:3
It won't work, Helix will just open one buffer for one of the inputs. What would be nice, if it instead opened a separate buffer for each. So the above command will open two buffers, one with the cursor at line 4 of LICENSE and the other with the cursor at line 6 of LICENSE.
This is going to be very useful in a lot of situations. For example, consider a tool like cspell which outputs in the following format:
README.md:170:229 - Unknown word (turles)
README.md:172:50 - Unknown word (inacurate)
README.md:173:25 - Unknown word (advsed)
README.md:182:51 - Unknown word (patricular)
README.md:190:81 - Unknown word (sofwtare)
README.md:193:291 - Unknown word (neihter)
README.md:201:289 - Unknown word (auhtor)
If only I could run a command like this, which I could compute from the above output:
Which would open 7 buffers, with cursor exactly at each line and column. Then I could do gn and gp to cycle between the spelling errors and fix them. Thoughts?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, you can add
:line_number
at the end of a file name to open it at a specific lineThe above opens
LICENSE
file at line 4.LICENSE:6:3
would open it at line 6, column 3.What if I want to open LICENSE file at line 4 and line 6 column 3, two buffers for the same file?
It won't work, Helix will just open one buffer for one of the inputs. What would be nice, if it instead opened a separate buffer for each. So the above command will open two buffers, one with the cursor at line 4 of LICENSE and the other with the cursor at line 6 of LICENSE.
This is going to be very useful in a lot of situations. For example, consider a tool like
cspell
which outputs in the following format:If only I could run a command like this, which I could compute from the above output:
Which would open 7 buffers, with cursor exactly at each line and column. Then I could do
gn
andgp
to cycle between the spelling errors and fix them. Thoughts?Beta Was this translation helpful? Give feedback.
All reactions