Skip to content

MisanthropicBit/vim-numbers

Repository files navigation


Text objects for numbers

Coverage Status


A small plugin that provides text objects for numbers.

  • Typing van or vin selects an integral or floating-point number (optionally with scientific notation and/or thousand separators).
  • Typing vai or vii selects a binary number (prefixed by 0b or 0B).
  • Typing vax or vix selects a hexadecimal number (prefixed by 0x, 0X, or #).
  • Typing vao or vio selects an octal number (prefixed by 0, 0o, or 0O).

There is no difference in selecting "a number" or "inner number".

vim-numbers demo

(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'

Similar Projects