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.

fx – command-line tool and terminal JSON viewer

fx is yet another command-line tool for working with JSON data. Some of the supported features:

  • Formatting and highlighting
  • Standalone binary
  • Interactive mode 
  • Themes support

This looks like a good alternative or a complimenting tool for both jq and jo.

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.

Managing dotfiles with rcm

These days it is a common practices to manage, version, and share configuration files for command line tools (bash, vim, etc) via a GitHub repository. There are plenty of open repositories to study and borrow things from, as well as the tools and scripts to help one with setting things up. Have a look at the awesome-dotfiles – a curated list of dotfiles resources.

Fedora Magazine runs an article about rcm – one of the many tools that are handy for managing dotfiles.

Personally, I haven’t heard of rcm until now. My own setup went through several iterations, varying from custom scripts, to Puppet, and now to Ansible. Have a look here. By the way, my dotfiles aren’t only about the command line tools. I also keep my desktop environment configuration in there (MATE + i3).