How To Speed Up The Code Review

How To Speed Up The Code Review” is a collection of excellent tips and strategies on how to make your Pull Requests easier to review. These work equally well for Open Source projects and for proprietary repositories.

The gist of this article is: don’t make large pull requests, and don’t mix different types of changes within the same pull request. Read the whole thing for suggestions on how to actually do that.

GitHub : Draft Pull Requests

Here are some exciting news from GitHub – an introduction of the Draft Pull Requests. I think this is a very welcome addition to GitHub features.

At work, we’ve been using a work around to solve the problem – a [WIP] prefix in the title of the pull request, which means that this is “Work In Progress” and the PR shouldn’t be merged.

While the prefix does help, it’s not as good as the new Draft Pull Requests. Somebody can still merge a [WIP] pull request by mistake. But with Draft Pull Requests, merging is blocked, until the developer indicates otherwise.

Great stuff!

gita – manage multiple git repositories

gita is a command line tool to manage multiple git repositories in parallel. You can easily check the status of several repositories, pull, push, commit, and so on.

This is a nice alternative to how we are handling things at work, with hundreds of repositories all around, but with a lot of overlap between them too. For us, a custom set of scripts works pretty well, with a combination of a powerful terminal emulator. Terminator, for example, provides handy functionality of split screen view, with grouped terminals, where multiple screens can be easily updated with a single command input.

SpaceVim – extended Vim configuration bundle

There are many different configuration bundles for Vim, which easy the discovery, installation, configuration, and documentation of different plugins and features of this powerful text editor. SpaceVim is yet another one of these.

If you are new to Vim, or have grown tired of trying to tweak it to your liking, please give it a try. It might just work for all your needs.

Vim: persistent undo

Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity.

The other day I came across “Ask HN: Best things in your bash_profile/aliases?” thread, with plenty of tips and tricks. One particular comment highlighted a feature that I kind of heard about but never got to setting up – persistent undo.

It turns out that starting with Vim 7.3 you can preserve the undo history between editing sessions. Which means that you make changes to a file, save it, close it, and when you reopen it later, you can press ‘u’ to undo the changes you’ve done during the last edit.

In order to set this up, you first need to create a folder, where Vim will store the undo history files. For example:

$ mkdir ~/.vim/undodir

Then, you need tell Vim that you want to use persistent undo and where to store the files. Edit the .vimrc file and add the following:

set undofile
set undodir=~/.vim/undodir

As long as you are using Vim 7.3 or newer and the directory exists, your persistent undo history will work like a charm.

Read the rest of the thread for more tips on how to clean it up periodically, and how to further improve your experience with Vim’s undo, using plugins that help navigate the undo tree.