在webstorm上安装自动编译less文件的插件步骤如下:

 1:首先下载webstorm下的插件,http://plugins.jetbrains.com/plugin?pr=idea&pluginId=7059

   注意:这个插件只使用与webstorm5.0以上。

   这个是他们的项目地址:http://www.open-open.com/lib/view/home/1354779342913

 2:打开他们的项目地址,查看readme.md,然后可以看到一下内容,然后按照以下步骤去做就能成功。这里注意下不同版本的webstorm选项名称可能不一样,但是总体步骤是一样的。(要点英文基础啦-.)

Usage

Installation

  1. Go to File > Settings (Windows / Linux) or IntelliJ IDEA > Preferences (Mac)
  2. Install the plugin from the IntelliJ plugin repository
  3. Restart the IDE

Configuration

  1. Go to File > Settings (Windows / Linux) or IntelliJ IDEA > Preferences (Mac)
  2. Under Project Settings, select LESS Compiler
  3. Click the "+" button to add a new LESS profile
  4. Choose a LESS source directory
  5. Add one or more CSS output directories and click OK
  6. Make changes to a LESS file and save it
  7. Rejoice!

 

3。成功后截图表示下:

webstorm自动编译less文件

看到那个浅绿色的提示框没有,说明成功了,然后看下是否自动生成或者修改了css文件。