Permalink
Commits on Apr 29, 2012
  1. Version 1.5

    Significant number of changes; all credit goes to Ingo Karkat--thank you, Ingo:
    
    - Added parallel function and mappings for ordinal numbers ("forty-second"), also configurable via g:numberToEnglish_ordinal_... variables.
    - Made remaining hard-coded words configurable via variables g:numberToEnglish_zero, g:numberToEnglish_negative.
    - Allowed to use hyphen separator for numbers in range 21-99; g:numberToEnglish_useHyphen.
    - Split into plugin and autoload script to minimize footprint.
    - Change default to let g:numberToEnglish_useAnd = 1
    - Fix additional comma in "one thousand, and one".
    salmanhalim committed with Apr 17, 2012
Commits on Oct 18, 2010
  1. Version 1.4

    Version 1.4
    
    Added an option to put in the word "and" (nine hundred AND twenty); off by default to retain old behavior:
    
    let g:numberToEnglish_useAnd = 1
    
    Added another configuration variable (French, in this example):
    
    let g:numberToEnglish_and = "et"
    
    Sections are now separated by commas; for example, "12345" becomes "twelve thousand, three hundred and forty five"
    Salman Halim committed with Oct 5, 2010
  2. Version 1.3

    Made the plugin accept global values for overriding the returned string; useful for changing the language, for example. Place the following in your _vimrc for
    French:
    
    let g:numberToEnglish_digits = [ "", "un",   "deux",  "trois",  "quatre",   "cinq",      "six",      "sept",         "huit",         "neuf" ]
    let g:numberToEnglish_teens  = [ "", "onze", "douze", "treize", "quatorze", "quinze",    "seize",    "dix-sept",     "dix-huit",     "dix-neuf" ]
    let g:numberToEnglish_tens   = [ "", "dix",  "vingt", "trente", "quarante", "cinquante", "soixante", "soixante dix", "quatre vingt", "quatre vingt dix" ]
    
    let g:numberToEnglish_scale = [ "", "mille", "million", "billion" ]
    
    let g:numberToEnglish_hundred = "cent"
    
    This change necessitates the use of GetVar (http://vim.sourceforge.net/scripts/script.php?script_id=353). Technically, the usage of GetVar allows the setting
    of any combination of these variables on a per-window, buffer or tab level (allowing different languages, capitalizations, etc., depending upon the buffer
    type, for example).
    Salman Halim committed with Mar 6, 2009
  3. Version 1.2

    Added two new mappings:
    
    <Plug>DNumberToEnglish and <Plug>DCNumberToEnglish -- the D is short for "Detailed".
    
    Differs from the versions without the D in that it places the original number at the end of the expanded version:
    
    Thus, 12341234 becomes twelve million three hundred forty one thousand two hundred thirty four (12341234).
    
    Version 1.1 (not uploaded):
    
    Took the hard-coded values out of the functions into script-local variables -- no sense defining them every time.
    Salman Halim committed with Mar 3, 2009
  4. Version 1.0: Initial upload

    Salman Halim committed with Feb 27, 2009