vim

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.

Vim config and logo

My intermediate Vim configuration and usage guide

This is my intermediate Vim configuration and usage guide.

It was aimed in particular at the newer Vim users at work, but someone else may get something from it too. Enjoy!

https://github.com/cspeterson/vim-guide-intermediate/blob/master/README.md