vim-lesscss


Ⅰ. 插件描述

Update corresponding css files on the fly while edit less files

Ⅱ. 基本信息

创建日期:  2012-11-01
使用用户:  10
Github星:  8
插件作者:  Vital Kudzelka

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'vitalk/vim-lesscss'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'vitalk/vim-lesscss'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'vitalk/vim-lesscss'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vitalk/vim-lesscss

Ⅳ. 文档说明

Vim Lesscss

Vim plugin that make it easy to edit less files without need to manually update
corresponding css file.

Note. For projects which have a complex structure automate this task with any of
existing task runners (personally I prefer combination of Grunt less
and Grunt watch).

Installation

If your don't have a preferred way to install Vim plugins, try to use
pathogen and then run:

cd ~/.vim/bundle
git clone git://github.com/vitalk/vim-lesscss.git

To install via Vundle add to your
.vimrc:

" Compiles your less files on the fly
Bundle 'vitalk/vim-lesscss'

Walkthrough

This is a partial tutorial, see :help lesscss for more details.

Change this to the location of lessc on your system, or define some additional
arguments when lessc is called:

" less to css executable (full path or simple executable)
let g:lesscss_cmd = '$(which lessc)'

Just open your less file in Vim and edit it. On save corresponding css file
will be created with the same name as original. If your want to save the output
css files anywhere else add to your vimrc:

" save css files to separate css folder (relative to original less location)
let g:lesscss_save_to = '../css/'

To toggle plugin just use the default key binding <Leader>l or remap it to
something nice.

" remap plugin toggle
let g:lesscss_toggle_key = '<Leader>.'

Or disable it by default

" disable plugin at startup
let g:lesscss_on = 0

License

Copyright © Vital Kudzelka <vital.kudzelka@gmail.com>.

Distributed under the same terms as Vim itself. See :help license for details.

添加新评论