ExPixel / vscode-eval

VSCode extension to evaluate selected text.

Home Page:https://marketplace.visualstudio.com/items?itemName=expixel.vscode-eval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vscode-eval README

Build Status

Evaluate multiple selections as javascript expressions and replace them with their values.

Features

  • Evaluates javascript expressions.
  • All functions and objects provided by the Math object are globals in eval.
  • Use $prev to use the value of the previously evaluated expression.
  • Use $s{n} to use the value of the the previously evaluated expression #n (0-based)
  • Extra Functions
    • hex(number, padTo = 0, padChar = 0) -- Convert number to hexadecimal.
    • bin(number, padTo = 0, padChar = 0) -- Convert number to binary.
    • oct(number, padTo = 0, padChar = 0) -- Convert number to octal.
    • itoa(number, radix, padTo = 0, padChar = 0) -- Convert a decimal number to another radix.

Eval Usage

Extension Settings

This extension contributes the following settings:

  • eval.evalSelectionsByPosition: If this is true, eval will evaluate expressions in order of their positions instead of the order they were created in. This is on by default.

Release Notes

1.0.0

Initial release of Eval

1.2.0

Changed the way that selections are evaluated and other minor changes.

Other

About

VSCode extension to evaluate selected text.

https://marketplace.visualstudio.com/items?itemName=expixel.vscode-eval

License:MIT License


Languages

Language:TypeScript 100.0%