summaryrefslogtreecommitdiffstats
path: root/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/sass.vim27
-rw-r--r--ftplugin/scss.vim20
2 files changed, 10 insertions, 37 deletions
diff --git a/ftplugin/sass.vim b/ftplugin/sass.vim
deleted file mode 100644
index e9561d95..00000000
--- a/ftplugin/sass.vim
+++ /dev/null
@@ -1,27 +0,0 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1
-
-" Vim filetype plugin
-" Language: Sass
-" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2010 Jul 26
-
-" Only do this when not done yet for this buffer
-if exists("b:did_ftplugin")
- finish
-endif
-let b:did_ftplugin = 1
-
-let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<"
-
-setlocal comments=://
-setlocal commentstring=//\ %s
-setlocal define=^\\s*\\%(@mixin\\\|=\\)
-setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')
-setlocal omnifunc=csscomplete#CompleteCSS
-setlocal suffixesadd=.sass,.scss,.css
-
-let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='
-
-" vim:set sw=2:
-
-endif
diff --git a/ftplugin/scss.vim b/ftplugin/scss.vim
index e95b70f5..55519c31 100644
--- a/ftplugin/scss.vim
+++ b/ftplugin/scss.vim
@@ -1,17 +1,17 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1
-" Vim filetype plugin
-" Language: SCSS
-" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2010 Jul 26
-
-if exists("b:did_ftplugin")
+if exists('b:did_indent') && b:did_indent
+ " be kind. allow users to override this. Does it work?
finish
endif
-runtime! ftplugin/sass.vim
-setlocal comments=s1:/*,mb:*,ex:*/,://
+setlocal indentexpr=scss_indent#GetIndent(v:lnum)
-" vim:set sw=2:
+" Automatically insert the current comment leader after hitting <Enter>
+" in Insert mode respectively after hitting 'o' or 'O' in Normal mode
+setlocal formatoptions+=ro
+
+" SCSS comments are either /* */ or //
+setlocal comments=s1:/*,mb:*,ex:*/,://
endif