gitvimvim-fugitive

Show interactive list of files changed by commit in vim-fugitive


I use the fugitive status windows quite a lot when working on commits. It's an easy and interactive way to see what I have changed and I can open any of the files where I have made changes and e.g. diff them. However, after I have committed, I can't find an equally great way to browse files changed at a specific commit or a commit interval. Ideally what I want is something like the fugitive status windows, but the most important feature is a list of files where I can click on a file and have it open.

Things I have tried


Solution

  • I asked this question in the repository and got an answer by the creator.

    [Question] Browse files changed by a commit

    The author of the plugin said that it is their long term goal to make the commit objects look and behave like the summary window. However, until that is implemented I can achieve a workflow similar to my request by

    1. Opening the commit object but with foldmethod set to syntax. This will fold the diffs and have each file on a separate line. Can also use [m and ]m to move the cursor between files in the commit object.
    2. Open files by pressing o instead of Enter, this will open them in a split and not the current window.