Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Ruby's rstfilter extensionNew to Visual Studio Code? Get it now.
Ruby's rstfilter extension

Ruby's rstfilter extension

Koichi Sasada

|
1,189 installs
| (2) | Free
Show the Ruby's execution results in your source code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-rstfilter README

You can see the execution results by saving the file.

Requirements

rstfilter-lsp command in latest rstfilter gem is needed.

$ gem install rstfilter

Usage

  1. Open .rb file and edit the script.

  2. Start rstfilter using one of the following three methods:

    • Use shortcut Ctrl+Alt+S. (recommended)

    • Use command "rstfilter: Save, exec and show results".

      Command Palette

    • Click "rstfilter" status bar.

      Status Bar

  3. Confirm the execution results on source code and the output.

    Output

  4. Hover your mouse pointer on the expression in the editor window and you can see the results.

    Hover

  5. Edit the script and all results are removed.

If your program halts, click the rstfilter status bar and the Ruby process will be killed.

Commands

  • ruby-rstfilter.save_exec_and_show: Start rstfilter.
  • ruby-rstfilter.restart: Restart rstfilter language server. If a Ruby process is running by rstfilter, kill the Ruby process.

Extension Settings

  • Rstfilter Lsp Path: Path to rstfilter-lsp (gem rstfilter for install).
  • Enable On Default: Enable rstfilter extension on load.

Advise

Writing library tips

Traditional idiom using $0 will help to use this extension.

class MyLib
  # ...
end

if $0 == __FILE__
  # Try MyLib here.
  # This code doesn't work when this file is required.
end
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft
OSZAR »