[TxMt] Math.tmbundle Suggestion: overwrite previous results
Timothy Bates
timothy.c.bates at gmail.com
Sat Jan 17 21:50:29 UTC 2009
CURRENT SITUATION: "Evaluate Line / Selection" barfs on lines like this
25/10 = 2.5
PROBLEM: This means the user has to manually delete the "= nnnnn" if
they wish to reevaluate the line
SUGGESTION: change the command to overwrite "( = [-0-9\.]+)" with the
new result.
I don't speak perl, but this is the bit that would like changing
printf " = %s" `{ tr -d ,; echo; } | bc -l`| perl -pe 's/(\.[^0]+)0+$|
\.0+$/$1/'
Bit early for xmas, but it would be great if a currency- and
formatting-friendly command was available, i.e., one which would be
happy to take
$250,000*12.5%
see "250000*12.5"
and return "$250,000*12.5% = $3,125,000"
More information about the textmate
mailing list