Closed sakelkar closed 1 year ago
I had tried that option and sure it traces the given line. I used :DiffviewFileHistory -L<Line1>,<Line1>:<filename>
and it seems to work as said.
But I am looking to cycle through other files changes (if any applicable) which were part of that commit when current line changed last time. Since your plugin, is actually centered around cycling through files in a given commit, I thought something like this will also be useful.
Apologies if I am missing something which is already present.
Thanks, Sameer
I used
:DiffviewFileHistory -L<Line1>,<Line1>:<filename>
and it seems to work as said.
If you have the buffer open for the file you want to trace, it's much easier to use vim ranges than the -L
flag. Just visually select the lines you want to trace and then:
:'<,'>DiffviewFileHistory
The -L
flag is only needed if you want to trace multiple ranges in one or more files, or you want to use the -L:{funcname}:{file}
regex variant.
But I am looking to cycle through other files changes (if any applicable) which were part of that commit when current line changed last time.
Once you have traced the line history for your given range just put the cursor on whatever commit you wish to inspect and press <C-A-d>
in order to :DiffviewOpen
the full change set for that specific commit.
Works. Thanks _/\_
:)
Hi,
Thanks for the great plugin.
Will you please consider, augmenting DiffviewFileHistory or DiffviewOpen to show diffs from commit that modified current line under the current file?
Many times getting the full context of the commit when current line was modified is very very useful. Helps to get the context very quickly. Typically when one is working on hot fixes and not a big feature.
Thanks Sameer