sponsor Vim development Vim logo Vim Book Ad

vim-numbers : Text objects for numbers

 script karma  Rating 4/1, Downloaded by 300  Comments, bugs, improvements  Vim wiki

created by
 
script type
utility
 
description
A small plugin that provides text objects for numbers.

Demo:
https://raw.githubusercontent.com/MisanthropicBit/vim-numbers/master/vim-numbers-demo.gif

- 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 or 0o).
- There is no difference in selecting "a number" or "inner number".

The plugin is maintained at https://github.com/MisanthropicBit/vim-numbers.
 
install details
Extract the zip in ~/.vim (or ~\vimfiles on Windows) or see https://github.com/MisanthropicBit/vim-numbers for alternative install details.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-numbers-1.0.3.zip 1.0.3 2021-11-28 7.4 * Fix number vselect contexts
* Recognise comma-separated numbers with scientific notation
* Add more test cases
vim-numbers-1.0.2.zip 1.0.2 2021-09-08 7.4 Fix bug in selecting octal numbers at the beginning of lines, make selecting octal numbers with multiple valid prefixes (e.g. `041407357` more robust), update documentation with `0O` as a valid octal prefix.
vim-numbers-1.0.1.zip 1.0.1 2021-09-07 7.4 Select octal numbers prefixed with a zero and capital o: '0O'.
vim-numbers-1.0.0.zip 1.0.0 2020-12-30 7.4 Initial upload
ip used for rating: 3.136.26.20

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github