tpope / vim-speeddating

speeddating.vim: use CTRL-A/CTRL-X to increment dates, times, and more
http://www.vim.org/scripts/script.php?script_id=2120
949 stars 40 forks source link

floating point number #5

Open mattn opened 12 years ago

mattn commented 12 years ago

How about support 0.9 to 1.0 with increment?

tpope commented 12 years ago

Sounds pretty complicated, once you take it to its logical conclusion: -1.00000 => -0.99999, for example (and that's not even counting the inevitable feature request for an option to omit the leading zero there). Plus it conflicts with versioning schemes (2.9 => 2.10), and needs to tread lightly around certain date formats (03.09.2012). And what happens if we invoke it before the decimal point? What happens if we invoke it on the 2 in 1.20?

The short of it is this feels like a lot of complexity for very little gain.

mattn commented 12 years ago

Sounds pretty complicated

Yes I think so. I could't write patch easily. Currently speeddating has d<c-a> like key mappings to differentiate something. How about f<c-a> treat floating point value?