From 29130fd1bdcc512de0658d13340d6a9c8e5d7a4b Mon Sep 17 00:00:00 2001 From: Alvin Chan Date: Fri, 26 Sep 2014 10:29:06 -0700 Subject: [PATCH 1/3] Add SCSS formatting using sass-convert --- plugin/defaults.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 96f4621..d089b40 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -38,6 +38,11 @@ if !exists("g:formatprg_args_expr_css") && !exists("g:formatprg_args_css") let g:formatprg_args_expr_css = '"-f - -s ".&shiftwidth' endif +if !exists("g:formatprg_scss") | let g:formatprg_scss = "sass-convert" | endif +if !exists("g:formatprg_args_expr_scss") && !exists("g:formatprg_args_scss") + let g:formatprg_args_expr_scss = '"-F scss -T scss --indent " . (&expandtab ? &shiftwidth : "t")' +endif + if !exists("g:formatprg_html") | let g:formatprg_html = "html-beautify" | endif if !exists("g:formatprg_args_expr_html") && !exists("g:formatprg_args_html") let g:formatprg_args_expr_html = '"-f - -s ".&shiftwidth' From a9514f208516d148b2d403051c8b60957e423efb Mon Sep 17 00:00:00 2001 From: Alvin Chan Date: Fri, 26 Sep 2014 11:00:08 -0700 Subject: [PATCH 2/3] Update README to include SASS details --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ecfa669..06b0143 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ It is shipped with `js-beautify`, which can be installed by running `npm install Note that `nodejs` is needed for this to work. Here is the link to the repository: https://github.com/einars/js-beautify. +* `sass-convert` for __SCSS__. +It is shipped with `sass`, a CSS preprocessor written in Ruby, which can be installed by running `gem install sass` +Here is the link to the SASS homepage: http://sass-lang.com/. + * `tidy` for __XHTML__ and __XML__. It's probably in your distro's repository, so you can download it as a regular package. For Ubuntu type `sudo apt-get install tidy` in a terminal. From 006607282af607543b2bb2ecc0c05279ccb81acf Mon Sep 17 00:00:00 2001 From: Alvin Chan Date: Fri, 26 Sep 2014 11:02:01 -0700 Subject: [PATCH 3/3] Add a missing period in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06b0143..08237d2 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Note that `nodejs` is needed for this to work. Here is the link to the repository: https://github.com/einars/js-beautify. * `sass-convert` for __SCSS__. -It is shipped with `sass`, a CSS preprocessor written in Ruby, which can be installed by running `gem install sass` +It is shipped with `sass`, a CSS preprocessor written in Ruby, which can be installed by running `gem install sass`. Here is the link to the SASS homepage: http://sass-lang.com/. * `tidy` for __XHTML__ and __XML__.