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.