

That way I know exactly what code goes into the staging area, implicitly enforcing a last-time quality check of the code. Staging occurs when my cursor is placed on top of the code to be staged.This allows me to easily ignore finished code. If I consider a chunk to be completed, I stage it and forget about it. I keep track of remaining work by navigating over remaining code chunks.My git history ends up being much more atomic, each commit having a clear, singular purpose.

#GIT BLAME DELETED LINE INSTALL#
Screenshot taken from airblade/vim-gitgutter README.md.Įven though many install the plugin for aesthetic purposes, where the plugin actually really shines is the way it enables you to quickly jump between “modified git chunks” and to operate upon those chunks. This is where the vim-gitgutter plugin comes to the rescue.

Marks do serve a really important purpose though, especially when you are jumping between two sections in the same file repeatedly. Setting and moving to destination markers with ` and m.īut I have always found marks a bit jarring to use in practice, as you have to set the marks before moving away and then having to remember those marks later.All types of movement operators such as, t/ T, f/ F, / C-u, and so on.Using ctags in order to navigate to a specific construct.Fuzzy searching all types of objects with fzf.vim.airblade/vim-gitgutterĮffortlessly moving between regions of interest in source files is a really central part of maintaining flow while writing code, and many tools are available for this purpose in vim: In this article I will present some excellent git-related Vim plugins which makes version controlling your code a breeze, so much so that version controlling your code becomes productive in itself, even ignoring all the traditional benefits of using git. What I have found, though, is that having git at my fingertips while I edit code has changed the way I write code for the better. Most developers are quite familiar with the git CLI, and will have no desire for pulling git into their editor of choice. Your preferred workflow will of course direct your choice of which tools to use, but what I find interesting is how the tools themselves may reversely influence the way you work.
