Vim, cfdo, Ale and RipGrep

This blog post goes over several grep-like tools and their integration with Vim.  If that’s something you do often, it’s worth a read.  The tools are:

  • Vim’s built-in “:cdo” and “:cfdo” commands.  Here’s another blog post with a nice explanation of what these are and how to use them.
  • Ale – asynchronous lint engine.
  • RipGrep – a very fast tool for recursively searching directories for a regular expression.  Extra bits for Vim integration are provided by the vim-ripgrep plugin.

The blast from the past

There are very few things that make you think of time and remind you how old you are like that email that I received another day.  Red Hat Bugzilla sent me an automated email about the update on the bug in Fedora 3 (!!!) that I commented on … in November of 2004.  Yeah, that’s good 13+ years ago.

This is so long ago, it’s almost unbelievable.  Back in those days, I was working at PrimeTel and even had a slightly different spelling to my surname.  Oh, boy.

Fedora 28

The brand new and shiny Fedora 28 has been released!  This one brings updates to Gnome, improved battery life, and external repositories for things like Google Chrome browser and Nvidia proprietary drivers.

Upgrading from Fedora 27 is easy and painless – I’ve tried it myself and all went without any problems at all.

git clean – a nice addition to git reset

Anybody working with git is probably well familiar with the way to undo the non-committed changes:

git reset --hard

As useful as the above command is, it still leaves some room for improvement. The above command will only undo non-committed changes on the files that git is tracking. Often, this would leave a whole bunch of files and directories in place, which are not tracked by git. So far, I’ve been using a really complicated approach for removing them, which involves git status, grep, cut, xargs, and rm. Yuck.

Turns out there is a better way, which I found in “Stupid git tricks” article:

git clean -df .

This one will forcefully remove all untracked files and directories from the current directory. Combining these two commands together results in all non-committed changes being undone, no matter if they are on tracked files or not. Cool!