Coder Social home page Coder Social logo

scss-syntax.vim's Introduction

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.

CSS3

For highlighting CSS elements, this plugin relies on css.vim that comes bundled with Vim. Unfortunately, it's support for CSS3 is only rudimentary. To avoid highlighting issues I recommend to install the vim-css3-syntax plugin.

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.

scss-syntax.vim's People

Contributors

cakebaker avatar gigabo avatar dexteryy avatar kknoer avatar marcweber avatar mig-hub avatar pabuisson avatar yevgenko avatar

Watchers

Robert Fauver avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.