求适用于Sublime Text 3的Node.js REPL类JavaScript控制台工具
Hey there! I get exactly what you're looking for— a handy Node.js REPL tool in Sublime Text 3 that works like the VS Code plugin you mentioned, with either real-time feedback or shortcut-controlled JavaScript console access. Here are my top picks that fit the bill:
NodeJS REPL
This is the most direct equivalent you'll find. It integrates a full Node.js REPL right into Sublime Text's panel.- How to use: After installing via Package Control, bring up the command palette with
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac), then search forNodeJS REPL: Open REPLto launch it. - Standout features: Send selected code snippets straight to the REPL using
Ctrl+Enter(Windows/Linux) orCmd+Enter(Mac) for quick testing. Your session context stays intact, so variables and functions you define remain available until you restart the REPL.
- How to use: After installing via Package Control, bring up the command palette with
SublimeREPL
A versatile, multi-language REPL tool that’s perfect if you want more customization options. It supports Node.js seamlessly.- How to use: Install via Package Control, then navigate to
Tools > SublimeREPL > Nodejs > Nodeto open the REPL. - Standout features: Configure custom key bindings to run entire files or selected code in the REPL. You can also switch between different Node.js versions if you have multiple installed, making it great for cross-version testing.
- How to use: Install via Package Control, then navigate to
Terminus
While not a dedicated REPL plugin, Terminus adds a full terminal emulator to Sublime Text—meaning you can run the standard Node.js REPL directly in a panel.- How to use: Install via Package Control, open a terminal panel with
Ctrl+Shift+P > Terminus: Open Default Shell, then typenodeto start the REPL. - Standout features: Customize the terminal’s appearance to match your workflow, and use split panels to keep your code and REPL side by side. Since it’s a full terminal, you can also run Node.js scripts or other commands alongside the REPL.
- How to use: Install via Package Control, open a terminal panel with
Quick Tip
If you want real-time feedback, some of these plugins let you set up auto-send triggers (a bit of setting tweaking required). For example, with SublimeREPL, you can add a setting to send your code to the REPL automatically whenever you save the file.
内容的提问来源于stack exchange,提问作者Abhishek K

