Open file at given line
MarcoBorra opened this issue · comments
Hello, my proposal is for an improvement. I would like it to be possible to open a file at a specific line. For example, if I type "nvy "filename.c" +500," it would open the file at line 500. It would be very useful for integrating the editor with external tools (e.g., Meld). Thank you.
Have you tried it? Because it will work exactly as you've proposed; nvy
will pass arguments that don't match any nvy
specific flags (at least I believe that's how it goes) to nvim
and apparently leading +
in front of argument means it will be invoked as a command (just like :
inside the nvim
).
So nvy filename.c +500
will open "filename.c" and invoke :500
command, which will jump to the line 500. You can go more creative than that, for example nvy file.txt "+10|normal V"
will select line 10 after launch.
For more info see: https://neovim.io/doc/user/starting.html
I can confirm this already works. Please try again and reopen the issue if something is broken 🙂