SublimeText 2 Javascript控制台 [英] SublimeText 2 Javascript console

查看:151
本文介绍了SublimeText 2 Javascript控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是SublimeText2和Javascript新手,使用Windows8。

我试图在Sublime文本中创建一个Javascript控制台。

I'm a SublimeText2 and Javascript newbie, using Windows8.
I'm trying to create a Javascript Console in Sublime Text.

我尝试了两种方法,但没有与我合作。

I've tried 2 methods, but none worked with me!

方法1:

我在这里安装了Nodejs Sublime Text 2 Package:

https://github.com/tanepiper/SublimeText-Nodejs

I've installed "Nodejs Sublime Text 2 Package" found here:
https://github.com/tanepiper/SublimeText-Nodejs

但是当我按Alt + R(在节点中运行当前脚本)我只是得到一条消息,说:

kill不被识别为内部或外部命令,可操作的程序或批处理文件。

But when I press Alt + R (run current script in node), I just get a message that says:
´kill' is not recognized as an internal or external command, operable program or batch file.

错误消息出现在一个黑色的窗口与标题C:\WINDOWS\system32 \cmd.exe,它只是出现,消失半秒(但我能够做一个打印屏幕)。

The error message appears in a black windows with the title C:\WINDOWS\system32\cmd.exe", it just appears and disappears in half a second (but I was able to make a print screen).

方法2:

我试图使用javascript控制台安装NodeJS,如下所示:
http:// www.wikihow.com/Create-a-Javascript-Console-in-Sublime-Text 请参阅方法2:2使用Node.js

I've tried to use a javascript console by installing NodeJS, as instructed here: http://www.wikihow.com/Create-a-Javascript-Console-in-Sublime-Text see Method 2 of 2: Using Node.js

但是当我按Ctrl + B或F7,虽然控制台出现(在SublimeText2的底部区域),我可以读取建筑在页脚信息,控制台保持完全清除,没有结果WHATSOEVERVER!

But when I press Ctrl+B or F7 although the console appears (in bottom area of SublimeText2) and I can read "Building" in the footer information, THE CONSOLE KEEPS COMPLETELY CLEAN, WITH NO RESULTS WHATSOEVER!

所以我被卡住了!请帮助!

So I'm stuck! Please help!

推荐答案

尝试使用 SublimeREPL 。我已经使用它相当成功,虽然在Win 7。

Try using SublimeREPL. I have used it quite successfully, although on Win 7.

使用tanepiper的插件,你可能不得不设置路径(我记得他们有问题与Windows) p>

With tanepiper's plugin, you may have to fiddle with setting paths (I remember them having issues with windows)

{
 // if present, use this command instead of plain "node"
  // e.g. "/usr/bin/node" or "C:\bin\node.exe"
  "node_command": false,
  // Same for NPM command
  "npm_command": false,
  // as 'NODE_PATH' environment variable for node runtime
  "node_path": false,

}

这篇关于SublimeText 2 Javascript控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆