As I'm editing a file in Vim, I would like to quickly highlight any changes I have made since my last commit, while still being able to edit the file. Is there anything that comes close to doing this?
Git is a distributed version control system, which you can use directly from Vim with some help from plugins: vim-fugitive (status unknown). Help text is provided. git-vim (included with Vim 7.1 and later). Provides ftplugin and syntax files for editing various git files (e.g. commit messages).
Git command works in the command line interface. The vim plugin named fugitive plugin is developed by Tim pope which is used to work with the git tool without terminating the editor. So, vim and git can work together by using the fugitive plugin.
Have a look at Tim Pope's fugitive.vim plugin.
I'm a git purist and usually drop into the command line for git, but when I'm in vim I find that this does most of what I need to do and yet I can still call git commands directly.
Edit 2020-01-23: Searched quickly and FYI saw that there's another plugin that seems more VCS agnostic: https://github.com/mhinz/vim-signify
There's a new plugin that does this: vim-gitgutter. It puts the changes in the Vim gutter whenever you save the file. Here's what it looks like in action:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With