学JavaScript过程中用到的Sublime中的技巧、插件

来源:互联网 发布:c语言运算符优先级口诀 编辑:程序博客网 时间:2024/05/12 13:59

翻墙

http://www.psiphon3.net/zh/index.html


Sublime安装Package Control

http://jingyan.baidu.com/article/c14654134b8bde0bfcfc4c9a.html


Sublime Text 3中运行JS代码

http://9iphp.com/web/html/create-a-javascript-console-in-sublime-text.html

1. 下载并运行Node。安装过程全部使用默认项。

2. 打开“Tools”–“Build System”–“New Build System”。

3. 清空Sublime Text打开的窗口,并把下面的代码粘贴进去。

{    "cmd": ["node.exe", "$file"],    "selector": "source.js"}

4.按 Ctrl+S 保存文件,把文件保存在默认的User文件夹下,命名为“node.sublime-build”。现在你已经完成创建Build System来了。

5.此时如果Sublime还开着的话,得关了重新打开

5.写完脚本之后,按Ctrl+B,窗口的底部就会出现一个控制台,显示你脚本的运行结果。


在Sublime中调用浏览器打开html文件

https://www.zhihu.com/question/27219231?sort=created

用Package Control安装 sidebarenhance 插件,然后,

Preferences/Key Bindings-user 在其中配置:

{ "keys": ["f5"], "command": "side_bar_files_open_with",         "args": {            "paths": [],            "application": "C:/Program Files (x86)/Mozilla Firefox/firefox.exe",            "extensions":".*"        }},
上面的配置的意思是 ,按F5之后,调用firefox.exe打开当前文件。


emmet 插件的使用

http://blog.csdn.net/lmmilove/article/details/9181323

http://www.iteye.com/news/27580


代码静态检查

http://www.wiibil.com/website/sublimelinter-jshint-csslint.html

在Windows下安装jshint 之后 可能 要把jshint的安装路径加入 path 环境 变量中

0 0