-
Notifications
You must be signed in to change notification settings - Fork 609
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
Provide a %(fileline) state variable #304
Comments
The built-in editor already supports jumping to a specific line number, but
|
Since 1 is a valid line number, I would suggest defaulting to 0 for missing line number. Also, given the terminology for patches, I would suggest |
@jonas the built-in editor binding doesn't work for me, since my git.editor is set to 'mvim --remote-wait-silent'. I get this error:
Vim is expecting a filename after --remote-wait-silent, but a line number before the option. Hence the need for a custom binding, and a linenumber placeholder. (I'd like to connect to my existing Vim instance to avoid swap file issues.) @vivien |
OK, let's make 0 the default. Since the state variables are "context sensible" I'd prefer to have only one |
@bkudria I finally got around to implementing this. I hope this fixes your problem. Feel free to provide feedback if you have the time to test. Note that by default the variable defaults to |
@jonas this works beautifully, thanks! |
This exposes the current file line number as the variable `%(lineno)`. The blame, blob, diff, grep and stage views updates the variable. Fixes jonas#304
Some editors support jumping to a particular line. It'd be great if the current line was exposed as
%(fileline)
or something similar, so an editor keybinding could instruct the editor to jump right to that line.The text was updated successfully, but these errors were encountered: