https://github.com/theacodes/vscode-qalc
Superpowered calcuator for VSCode using Qalculate!
https://github.com/theacodes/vscode-qalc
Last synced: about 1 month ago
JSON representation
Superpowered calcuator for VSCode using Qalculate!
- Host: GitHub
- URL: https://github.com/theacodes/vscode-qalc
- Owner: theacodes
- License: other
- Created: 2021-08-30T19:09:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-30T19:10:11.000Z (almost 4 years ago)
- Last Synced: 2025-03-31T04:32:43.605Z (3 months ago)
- Language: TypeScript
- Size: 4.24 MB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qalc - an expressive & powerful calculator
This extension uses the incredibly powerful [Qalculate!](http://qalculate.github.io/) to bring quick, powerful mathematical expression evaluation and calculation to VSCode.
If you're an engineer that works with physical quantities this extension is your new best friend.
## Features

Using the extension is short and sweet. You can run qalc on the current selection / line through the command palette.
**Even better**, you can run qalc and *replace the current selection / line* with the command palette or the keyboard shortcut **⌘ + ⇧ + /** (Mac) or **⌃ + ⇧ + /** (Windows / Linux).
The extension is clever enough that you can run the command on Markdown inline code blocks (`` `like this` ``), so it's fantastic for writing!
The real power comes from [`qalc`](http://qalculate.github.io/manual/qalc.html)- It is an extremely powerful calculator and you'll definitely want to check out the [manual](http://qalculate.github.io/manual/index.html) if you want to learn everything about it.
## Requirements
You must have [Qalculate!](https://qalculate.github.io/) installed. It's not hard, I promise.
If you're on a Mac, use [homebrew](https://brew.sh/):
```bash
brew install qalculate-gtk
```If you're on Windows or Linux, head over to the [Qalculate! downloads](http://qalculate.github.io/downloads.html) page where you can snag pre-built binaries as well as the source code, if you're into that sort of thing.
## Extension Settings
Qalc has just one VSCode setting, `calc.settings`. It's a list of `set` commands which it passes along to `qalc`. There's a [full list of settings](https://qalculate.github.io/manual/qalc.html#SETTINGS) on the `qalc` man page.
For example:
```json
"qalc.settings": [
"base 16",
"divsign 2",
]
```Would cause `qalc` to use hexadecimal and the division sign (`÷`) when displaying results:
```
# input
16/2
# before
16 ∕ 2 = 8
# after
16 ÷ 2 = 0x8
```## Getting help
This extension uses [Qalculate!](http://qalculate.github.io/) for evaluating your expressions- so if you run into trouble that's the first place to start.
## License & contributing
This extension is licensed under the [MIT License](LICENSE) and [contributions are welcome!](https://github.com/theacodes/vscode-qalc).