【openlayers】Sublime text 2 体验

在异次元看到一篇介绍Sublime代码编辑器:http://www.iplaysoft.com/sublimetext.html

Real Sexy!!

初步使用下来感觉非常符合我的口味!中文版下载地址http://www.ithome.com/html/soft/27362.htm

对于Ol开发在这主要介绍两点一个是插件sublimeCodeIntel另一个就是sublime的code snippet。

sublimeCodeIntel :能够让sublime跳转到变量或方法定义的地方(跨文件)以及代码提示(支持自定义的类)

sublime的code snippet:快速输入代码段,我们可以编写一些自己经常用到的一些代码片段。

例如:

<snippet>
    <content><![CDATA[
        OpenLayers.Layer.WMS(${1:name},${2:url},{
          lyers:${3:name},
          format: ${4:'image/jpeg'},
          isBaseLayer:"${5:true}"
          },
           { opacity:"${6:1}",
            singleTile: "${7:false}"
          }
        );
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>OpenLayers.Layer.WMS</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.js</scope>
</snippet>

按tab可向下切换属性值。

原文地址:https://www.cnblogs.com/shitao/p/2767069.html