zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.84k stars 2.68k forks source link

:[number] in NOT vim mode to still go to that line number #16698

Open bobbymannino opened 3 weeks ago

bobbymannino commented 3 weeks ago

Check for existing issues

Describe the feature

When opening file pallete <Cmd+P> or command pallete it would be nice to be able to shoot to a certain line by typing colon . I dont want to be in vim mode though. as far as I can tell there isn't a way I can do this right now?

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 2 weeks ago

ctrl-g triggers the go_to_line::Toggle action

But it would be nifty if pressing cmd-p : 123 jumped you to line 123 in the file.

armchairdj commented 2 days ago

Simiilarly, when command-clicking a filename with trailing a :<line number> in iTerm 2 on Mac, Zed correctly opens the file but fails to jump to the line.

This makes interactive debugging of rspec failures in Rails projects really annoying. I get a failure and Rails helpfully prints the file path and line number of the failing spec, but when I click on it, I then have to manually navigate down to the correct line number.

I'd expect this to open the file at line 68 when ./spec/actions/presenter.rb:68 is command-clicked in iTerm 2:

Finished in 3.74 seconds (files took 2.41 seconds to load)
17 examples, 1 failure

Failed examples:

rspec ./spec/actions/presenter.rb:68 # Actions::Presenter works correctly