Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calc package #93

Closed
ZIEXED opened this issue Jul 12, 2016 · 11 comments
Closed

Calc package #93

ZIEXED opened this issue Jul 12, 2016 · 11 comments

Comments

@ZIEXED
Copy link

ZIEXED commented Jul 12, 2016

Don't list "Calc package" until a sign inserted +-*×... after the numbers

@polyvertex
Copy link
Member

It would be a perfect idea if only Calc were not used also as a base converter (which implies no use of detectable operator). I guess that means you're not happy enough with the always_evaluate setting?

@ZIEXED
Copy link
Author

ZIEXED commented Jul 13, 2016

No, to be able to see the results immediately without selecting any item is better
I won't never use it as a base converter, most people use it as a simple calculator

@polyvertex
Copy link
Member

most people use it as a simple calculator

Do you have a reference to that information somewhere?

@ZIEXED
Copy link
Author

ZIEXED commented Jul 13, 2016

No, just a guess
it would be great to make it as option even if disabled by default

@psistorm
Copy link

psistorm commented Jul 19, 2016

Well I guess as an option that would be ok. But I actually like the possibility to only having to enter 0b01010 or 0xFA to get the integer value for it without having to choose = before 👍

@ThaSiouL
Copy link

ThaSiouL commented Aug 3, 2016

Hey,

I just played around a bit with the calc module. My version only shows the suggestion if the result is different from the query. So conversion to integer is still a go while the 1 query 1 result suggestions are gone.

Calc.zip

EDIT by @polyvertex: @ThaSiouL has published its contribution in a GitHub repository

@ThaSiouL
Copy link

ThaSiouL commented Aug 3, 2016

updated version in #98

EDIT by @polyvertex: @ThaSiouL has published its contribution in a GitHub repository

@ZIEXED
Copy link
Author

ZIEXED commented Aug 4, 2016

@ThaSiouL you forgot the space before "(Press enter to copy...)"
Thanks for sharing :)

@polyvertex
Copy link
Member

Reopened issue as offered solution is not part of the official distribution.

@polyvertex polyvertex reopened this Aug 4, 2016
@polyvertex
Copy link
Member

An intermediate solution has been integrated in the official package (to be released).

The = keyword can be specified as a prefix to request plugin to evaluate the remaining of the typed string. For example, search string =2+3 will always be evaluated, whereas string 2+3 will be evaluated only if the always_evaluate option is enabled, as expected. Otherwise, the = catalog item is still available and can be selected to specifically request an expression evaluation.

The rationale behind this choice is that the plugin cannot guess if user wants to calculate or to convert. More specifically, the version to be released will automatically return several results depending on its type and its nature. For example, an integer result will be declined in several bases (decimal, hexadecimal, octal and binary) and a floating point number may also be declined in normalized and/or scientific notation in addition to the normal display, if needed.

@polyvertex
Copy link
Member

The Calc package has been greatly improved and released with v2.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants