Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Calculate 2^1New to Visual Studio Code? Get it now.
Calculate 2^1

Calculate 2^1

Rafael Cossovan

|
602 installs
| (1) | Free
Select some math expression and evaluate it
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Studio Code Calculate 2^1

About

Uses Math.js for evaluating expressions. If it works there, it should work here!

How to use

  1. Select an expression in your document. For example: ((((5*5)+1)/2)-10)^2
  2. Enter the Command Palette (F1), and type "calculate"
  3. The evaluated result will appear after your selection

Counter

The $i in any selection is replaced by the index of the selection. For example if you have three identical selections 2*$i+1 the results will be 3, 5 and 7.

Selecting multiple items and running the calculate function

Available Commands

  • Calculate calculates selected expression, and appends "=" with the result
  • Calculate and Replace calculates selected expression, and replaces it with the result

Acknowledgements

  • This source code is heavily based on acarreiro.calculate.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft