Skip to content
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

Open real file and line touched in a diff #1309

Closed
albfan opened this issue Aug 15, 2019 · 1 comment
Closed

Open real file and line touched in a diff #1309

albfan opened this issue Aug 15, 2019 · 1 comment

Comments

@albfan
Copy link

albfan commented Aug 15, 2019

The whole idea is to look for some change in commits, through Glog, open any of the touched files and jump to line modified (if it still exists).

After inspecting a commit if you want to jump to a file you can do:

  • move cursor to diff
    <CR> (to open the file diff)
    :Gedit to open that file (or a new file if file diff was to delete, you know)

Is there a way to jump to a file (and the hunk if it still exists in the file) directly from a commit buffer?

If there's no way right now to do it but seems interesting I can code it to add to fugitive buffer.

All the cases were you cannot jump (line was modified) file do not exist in current checkout, will show a message with the error.

@tpope
Copy link
Owner

tpope commented Aug 15, 2019

Added just a few days ago, :.Gblame --reverse will take you to the commit that removed a line, or to the line in the work tree if it still exists. It's also mapped as 1<CR>.

@tpope tpope closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants