vim-convert Vim plugin graphic

Quick and easy unit conversions within Vim (vim-convert)

Header image bits: Vim logo from D0ktorz and SI Units from Dono

Editing some varieties of documents I noticed myself jumping into a browser or terminal often to do unit conversion. But no longer! Vim-convert is a plugin I made for Vim that allows easy unit conversion from a simple command.

The command

Some usage examples

To convert in-place the currently visually-selected text which includes a
unit, e.g. 500g

To convert in-place the currently visually-selected text which does *not*
include a unit, e.g. 500, you’ll need to specify one:

To insert a unit conversion as a new value after the cursor, give both fields:

To cause an error because parsecs are a unit of distance:


This plugin will try to be mindful of whether the unit itself is desired when
replacing text. That is, if the selected text lacks a unit, the result will be
placed without one as well.

Installation instructions and other details in the README.

Brightness icon code backdrop

My Linux ACPI brightness control script

Brightness icon in featured image by Elegant Themes

When I started using i3 window manager, I knew I’d basically have to re-engineer a number of desktop environment features myself around the bare window manager. One of these features is easy brightness control on my laptop.

The Arch Wiki has a *great* and in-depth page on this as it can be a very complex matter with a bunch of different ways to manage it on different hardware. Here! But after that, and if the ACPI method works for you, here is the script I came up with to manage it on Ubuntu!

ACPI brightness controls

So if you see something listed like this then you probably have a backlight you can interact with

The files we’re interested in are brightness and max_brightness. Writing a value into brightness will… change the brightness! But one must be root to do this.

My script

So I made a script to do it! (Here is the current version of the script in my dotfiles, which may differ since the writing of this post)


If you’re going to bind this to some key combo, you may want to allow this to sudo without a password (as securely as possible).

Here is my binding for i3wm

So there you go!