Awesome
<div align="center"> <br /> <img width="80%" src="vim-numbers-logo.svg" /> <p><i>Text objects for numbers</i></p> <p> <img src="https://img.shields.io/badge/version-1.0.3-blue" /> <a href="https://github.com/MisanthropicBit/vim-numbers/actions?query=workflow%3A%22Run+vader+tests%22"> <img src="https://img.shields.io/github/workflow/status/MisanthropicBit/vim-numbers/Run%20vader%20tests/master" /> </a> <a href="https://coveralls.io/github/MisanthropicBit/vim-numbers?branch=master"> <img src="https://coveralls.io/repos/github/MisanthropicBit/vim-numbers/badge.svg?branch=master" alt="Coverage Status" /> </a> <a href="/LICENSE"> <img src="https://img.shields.io/github/license/MisanthropicBit/vim-numbers" /> </a> <img src="https://img.shields.io/badge/compatible-neovim-blueviolet" /> </p> <br /> </div>A small plugin that provides text objects for numbers.
- Typing
van
orvin
selects an integral or floating-point number (optionally with scientific notation and/or thousand separators). - Typing
vai
orvii
selects a binary number (prefixed by0b
or0B
). - Typing
vax
orvix
selects a hexadecimal number (prefixed by0x
,0X
, or#
). - Typing
vao
orvio
selects an octal number (prefixed by0
,0o
, or0O
).
There is no difference in selecting "a number" or "inner number".
(Demo uses keycastr and Mac's Cmd+Shift+5)
Installation
- Pathogen:
git clone https://github.com/MisanthropicBit/vim-numbers ~/.vim/bundle/vim-numbers
- NeoBundle:
NeoBundle 'MisanthropicBit/vim-numbers'
- VAM:
call vam#ActivateAddons(['MisanthropicBit/vim-numbers'])
- Vundle:
Plugin 'MisanthropicBit/vim-numbers'
- vim-plug:
Plug 'MisanthropicBit/vim-numbers'