web storm使用和配置
官网:http://www.jetbrains.com/webstorm/
webStorm,File=》setting=》JavaScript-Libraries
How WebStorm Works: Completion for JavaScript Libraries
One of the essential features of WebStorm’s editor is code completion. The way it is implemented in WebStorm is that it takes all JavaScript files in the project and goes through them, adding functions and methods to an internal index used for code completion suggestions. The index is automatically updated whenever existing files are changed or new files are added.
JSDoc , used for documenting code, also plays an important role in making your coding experience better. It powers WebStorm autocompletion with additional details about parameters and their types.
But what if you have only minified files included, or if all the libraries are loaded dynamically? In this case it would be impossible for the IDE to statically analyse them and provide the necessary level of code completion when you press Ctrl+Space, or to resolve functions and methods you use.
This is where we introduce the concept (or mechanism) of External libraries that we use in WebStorm.
External libraries
External libraries are files explicitly added to project’s index to be used only in enhancing coding assistance (i.e. code completion, syntax highlighting, navigation, and documentation lookup). They are not to be edited in the scope of this project.
To make this concept clearer, let’s see how it works on a real project. Here is a simple project using the Famous framework for UI (same as on the screenshots above).
As we can see, some framework-specific methods are not resolved. This happens because the file famous.js is in not in the project, but is hosted on CDN.
To make WebStorm aware of the functions and methods of the library without adding its source code to the project, we need to set it as an External JavaScript library.
There are several ways to do this:
- Download the library from the CDN link
The quick-fix ‘Download library’ (call up with Alt+Enter) loads the file from the CDN link into the WebStorm cache (but not in your project).
You can go to Preferences | JavaScript | Libraries to load the list of all libraries that could power code completion for your project and enable specific aspects of code completion that you need.
- Add file or folder
Another way to add libraries to this list is manually. This option is useful when the library is stored locally on your computer, but not in the project folder.
Select Preferences | JavaScript | Libraries and click Add . Enter the library name and the path to the library file or folder. If you select Global visibility level, you’ll be able to enable this library in your other projects.
Additionally, you can specify the path to library’s/framework’s documentation. This URL will be opened when you press Shift+F1 ( Show external documentation ) on methods from the library.
Important note: If your library files are in the project folder, it’s worth adding them to the list of JavaScript libraries as described above: as a result, code inspections will be disabled for these files, and project-wide Code quality analysis will become faster.
Consider node_modules folder as an example. We would like to have code completion for the modules and keep them in the project, but there is no need for us to run inspections against these files. That is why this folder should be marked as a library. In fact, WebStorm does that automatically.
Node.js Core modules as External library
Node.js core modules (like http or fs ) are another example where External libraries are used. WebStorm suggests downloading the sources and marks them as Global libraries.
Once you’ve downloaded the sources, you can enable coding assistance for functions and methods from Node.js core modules in any of your projects. To do that, go to Preferences | JavaScript | Libraries and select the checkbox:
Using TypeScript community stubs (TypeScript definition files)
WebStorm provides one more workaround for adding coding assistance for some popular libraries, frameworks and modules when you don’t have the source code available in your project. It allows you to download DefinitelyTyped stubs. These definition files for libraries and frameworks are added to the list of your project’s External libraries, thus enhancing code completion.
Develop with pleasure!
JetBrains WebStorm Team
文章转自:http://www.tuicool.com/articles/732ENnZ
新版本的默认支持zen coding。
问题:如何修改编辑器字体

WebStorm live edit功能与浏览器实现同步实现步骤:
http://ju.outofmemory.cn/entry/70084
http://www.350351.com/bianchengyuyan/CSS/314781.html
更多:http://www.cnblogs.com/jikey/archive/2012/03/28/2420704.html
运行:
配置:ctrl+alt+s。
alt+F2.
常用快捷键:
web storm入门指南:
WebStorm安装Vim以及快捷键设置
WebStorm安装Vim以及快捷键设置
运气好,赶上了2012年12月21日“世界末日”的促销活动,便宜买到了这款号称The smartest JavaScript IDE的软件。
我一向对工具很挑剔,由于是从.NET转型成Web前端,在尝试了Sublime Text 2以后,还是觉得VS把Web Essential, VsVim之类的插件装全了,更好用也更好看一些。
同时,作为一个Vim的受益者,IDE对Vim支持得如何很大程度上影响了我的选择。在vim的支持方面,VS的VsVim和Sublime的Vintage都有一些缺陷。种种原因,令我对WebStorm充满了期待。
安装Vim插件
在主界面用快捷键ctrl+alt+s打开settings界面,左侧导航栏里选中plugin项,如下图:
选中plugins后,会在右侧列出所有已安装的插件,我们要新安装一个插件,因此要点击Browse repositories。
弹出的新窗口默认会列出所有的插件,我们在右上角的搜索框输入ideavim进行筛选,然后在ideaVim上右键选择Download and install,如下图:
下载进度会显示在WebStorm主窗口底部的状态栏,下载完毕后会有提示,需要重启Web Storm才能使插件生效
重启后,就已经是Vim的输入方式了。这时候打开Tools菜单,会看见多了两项。
VIM Emulator:切换是否使用Vim的输入方式。
Reconfigure VIM Keymap: 设置快捷键。下文中我们将会用它来设置快捷键。
设置快捷键
长期在Windows下工作,使用Vim不可避免要搭配一些Windows的快捷键,比如ctrl+c, ctrl+v,在gVim, VsVim, Vintage里都做出了妥协,采用了Windows的行为。但WebStorm默认并没有保持这些快捷键在Vim中原有的作用。没关系,下面就来详述一下如何解决这个问题。
具体做法是:新建一套键盘映射,然后让vim使用这套映射。
(我装了vim插件后,进入vim编辑模式,ctrl+z默认撤销, 用,ctrl+c不行)。
首先,在主界面用快捷键ctrl+alt+s打开settings界面,左侧导航栏里选中Keymap项,如下图:
在右侧的keymaps下拉列表中选择Default,我们将以此为基础进行修改,因此点击copy按钮,复制一份新的出来,接下来就可以放心在上面修改了。
给它起一个新的名字myVim。
现在要看看copy命令的快捷键,于是在右上的搜索框输入copy,会把与copy相关的都筛选出来,见下图:
我们看到,ctrl+V和ctrl+Insert都能达到copy的目的。同样,在Default模式下ctrl+V也可以实现paste操作了,这些快捷键都从Default那里继承了过来。
常使用Vim的人肯定知道Esc键有多常用。但现代键盘几乎都让Esc键偏居一隅,够起来不方便。其实在标准的Vim里,ctrl+[同样能达到Esc的效果。但是在WebStorm的Default模式下,ctrl+[已经被赋予了另外的作用,由于myVim从Default继承而来,因此ctrl+[也起不到Esc的作用。好在WebStorm的自定义快捷键可以覆盖系统的默认设置。
在上图中快捷键的位置上点击右键,会弹出用于删除和添加快捷键的菜单。修改的时候,如果和别的快捷键有冲突会看到红字提醒。例如下图所示,ctrl+[的原有功能是Move caret to code block start. 我们的本意就是给它赋予新的功能,果断点OK,接下来会再弹一个确认对话框,点remove删除原有的热键功能。
完成后点击下面的OK按钮退出Keymaps设置。如下图,打开主界面菜单栏中的Tools > Reconfigure VIM Keymap,下拉列表中选择刚才新建的myVim。重启WebStorm,大功告成。
这时候再试一试ctrl+[,是不是已经可以从Insert Mode返回到Normal Mode了?
避免按Esc键的其他方法
有人觉得ctrl+[按起来麻烦,习惯用CapsLock或者JJ来模拟Esc,可以看一下http://vim.wikia.com/wiki/VimTip285
针对Windows用户的配置,请参考 http://vim.wikia.com/wiki/VimTip75
参考:http://www.cnblogs.com/dc10101/archive/2013/01/02/2841900.html
我把ctrl+d变成了delete line。
http://cssha.com/webstorm/?replytocom=
web storm使用和配置的更多相关文章
- Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架
SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...
- javaWeb项目中Web.xml的基本配置
这个地址写的非常好 ,欢迎大家访问 Å:http://www.cnblogs.com/hxsyl/p/3435412.html 一.理论准备 先说下我记得xml规则,必须有且只有一个根节点,大小写敏感 ...
- web.xml常用元素配置
tomcat服务器: tomcat是一个WEB服务器,所有的j2ee WEB程序可以在此处运行. tomcat服务器是一个符合j2ee标准的WEB服务器.则J2ee的EJB程序无法在此处运行. 如果要 ...
- [转载]部署Office Web Apps Server并配置其与SharePoint 2013的集成
Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...
- 部署Office Web Apps Server并配置其与SharePoint 2013的集成
部署Office Web Apps Server并配置其与SharePoint 2013的集成 Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.P ...
- 在web.config里面添加配置信息
在web.config里面添加配置信息规范文字 代码如下 在<appSettings>中间添加 <add key="Director" value="处 ...
- zabbix web场景模拟监控配置
一,zabbix2.2.3 VMware Vsphere exsi监控配置步骤, 1,添加监控主机 2,添加聚集macro;{$PASSWORD} = yoodo.com{$URL} = http:/ ...
- Tomcat 配置WEB虚拟映射 及 配置虚拟主机
Tomcat 配置WEB虚拟映射 及 配置虚拟主机 配置WEB虚拟映射文件夹有三种方法例如以下: 第一(要重新启动server的): 打开路径 Tomcat 6.0\conf 下的 server.x ...
- web.config文件中配置数据库连接的两种方式
web.config文件中配置数据库连接的两种方式 标签: 数据库webconfig 2015-04-28 18:18 31590人阅读 评论(1)收藏举报 分类: 数据库(74) 在网站开发 ...
随机推荐
- SpringInAction读书笔记--第4章面向切面
1.什么是面向切面编程 在软件开发中,散布于应用中多处的功能被称为横切关注点,这些横切关注点从概念上是与应用的业务逻辑相分离的,但往往分直接嵌入到应用的业务逻辑之中,把这些横切关注点与业务逻辑相分离正 ...
- Word 2010巧妙绘制各种分割线的方法(图文)
引用: 使用Word编辑文档时,可能为了使某些内容醒目显示,或者为了使文档内容显示的更美观.更有层次感,需要为文档添加一些分割线,如添加下框线.插入水平线.使用特殊符号快速绘制分割线等等.在Word ...
- java中的IO流
Java中的IO流 在之前的时候我已经接触过C#中的IO流,也就是说集中数据固化的方式之一,那么我们今天来说一下java中的IO流. 首先,我们学习IO流就是要对文件或目录进行一系列的操作,那么怎样操 ...
- TreeSet集合
TreeSet集合 TreeSet集合是一个依靠TreeMap实现的有序集合,内部存储元素是自动按照自然排序进行排列,所以如果想要保留存储时的顺序,那么就不建议使用TreeSet. TreeSet继承 ...
- 通过 ANE(Adobe Native Extension) 启动Andriod服务 推送消息(五)
这一节,用个简单的例子来调用下之前生成的service.ane 首先建一个flex手机项目 然后在构建路径中把ane引进来 可以看到此ane支持Android平台. serviceMobile.mxm ...
- opcache运行时配置参数详解
PHP的opcode缓存又出 了新成员(说新不新,也有一段日子了),那就是opcache.新浪微博等都在使用,惠新宸老师强力推荐.本人最近根据官网地址 (http://www.php.net/manu ...
- DB2实用命令记录
quiesce tablespace quiesce tablespaces for table <table_name> share; Monitor Switches details ...
- 笨方法学python 33课
今天Eiffel看到了第33章,任务是把一个while循环改成一个函数. 我在把while循环改成函数上很顺利,但是不知道怎么写python的主函数,在参数的调用上也出现了问题. 通过查资料,发现py ...
- NodeJS+Express+Socket.io的一个简单例子
关键字:NodeJS,Express,Socket.io. OS:Windows 8.1 with update pro. 1.安装NodeJS:http://nodejs.org/. 2.初始化一个 ...
- JDBC和DBUtils区别(查询时jdbc只能返回ResultSet需要po转vo,dbutils返回的BeanListHandler与BeanHandler对应集合与对象)
17:34 2013/6/7 JDBC //添加客户 public void addNewCustomer(Customer c) throws DAOException { Connection c ...