Home

Awesome

Vi-Increment

Gitter Matrix

Increment and decrement numbers easily with Ctrl+a and Ctrl+x:

Usage

Vi-increment registers itself as a Vi change, so numeric prefixes and the dot command can be used:

$ 200             # 10<C-x>
$ 190             # 200.
$ -10             # .
$ -210

With setopt octalzeroes, Vi-increment will let Zsh-native arithmetic detect octal numbers and preserve them:

$ 0077            # <C-a>
$ 0100

Binary numbers are also detected and preserved:

$ 0b100011        # 11<C-x>
$ 0b11000

Vi-increment will also preserve leading zeroes, and fully supports negative numbers:

$ (( -0x0040 ))   # 8<C-a>
$ (( -0x0038 ))

Features

Future features:

Installation

Antigen:

antigen bundle zsh-vi-more/vi-increments
antigen apply

Zgen:

zgen load zsh-vi-more/vi-increment
zgen save

Zplug:

zplug zsh-vi-more/vi-increment

Zplugin:

zplugin ice wait "0"
zplugin light zsh-vi-more/vi-increment

# Optionally, track the latest development version:
zplugin ice wait "0" ver"dev"
zplugin light zsh-vi-more/vi-increment

Manually: Clone the project, and then source it:

source /path/to/vi-increment/vi-increment.zsh