vim-scss


Ⅰ. 插件描述

# Vim Syntax File for SCSS (Sassy CSS)

Ⅱ. 基本信息

创建日期:  2015-06-12
使用用户:  1
Github星:  0
插件作者:  sed

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vim Syntax File for SCSS (Sassy CSS)

Installation

I recommend to use a plugin manager like Vundle for the installation.

Vundle

Open your ~/.vimrc file and add the following line(s):

Plugin 'JulesWang/css.vim' " only necessary if your Vim version < 7.4
Plugin 'cakebaker/scss-syntax.vim'

Afterwards, run :PluginInstall in Vim.

Manual

  • Download scss.vim
  • Download css.vim (only necessary if your Vim version < 7.4)
  • Copy the content of the folders to the respective folders in ~/.vim/

Configuration

Usually no configuration is necessary.

Filetype

In some cases you might want to change the filetype from scss to scss.css, for example, if you want to use SnipMate's CSS snippets within your SCSS files. In this case, add the following line to your ~/.vimrc file:

au BufRead,BufNewFile *.scss set filetype=scss.css

Please be aware that this setting can cause problems with other plugins as mentioned in #41.

Function names starting with a keyword

Function names starting with a keyword (e.g. baseline-unit()) are not highlighted correctly by default. It can be fixed by adding the following line to your ~/.vimrc file:

autocmd FileType scss set iskeyword+=-

Please be aware that this setting also affects the behavior of the motion keys.

添加新评论