• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

calc

Calculation short-cuts for Atom.
Lixquid
0.4.0 2,678
14
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Calc

Calculation short-cuts for Atom.

Commands

evaluate

Evaluates the expression selected and appends it.

Example: 5 + 5 + 5 => 5 + 5 + 5 = 15

replace

Evaluates the expression selected and replaces it.

Example: 5 + 5 + 5 => 15

count

For every selection, replace the text with the currently selected index.

Functions

Some functions not normally available to Javascript are available inside expressions:

Math.pwd

Generates a random password of a given length. If not given a length, defaults to 20.

Extended Variables

Extended Variables provide meaning to some "magic" variable names:

  • _ is replaced with the result of the last expression.
  • _n (e.g. _1, _2, etc..) is replaced with the result of the nth expression.
  • i is replaced with the number of the current selection.

Notes

By default, all expressions are surrounded with with (Math), which causes all Math functions to be usable without needing a Math. prefix.

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by