Update runtime files.

This commit is contained in:
Bram Moolenaar
2019-12-05 22:47:25 +01:00
parent e38eab22c1
commit c08ee7476b
17 changed files with 384 additions and 94 deletions

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2016 Aug 29
" Last Change: 2019 Dec 05
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -13,11 +13,25 @@ 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 includeexpr=SassIncludeExpr(v:fname)
setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.sass,.scss,.css
if &filetype =~# '\<s[ac]ss]\>'
setlocal iskeyword+=-
setlocal iskeyword+=$
setlocal iskeyword+=%
let b:undo_ftplugin .= ' isk<'
endif
let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@='
let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='
function! SassIncludeExpr(file) abort
let partial = substitute(a:file, '\%(.*/\|^\)\zs', '_', '')
if !empty(findfile(partial))
return partial
endif
return a:file
endfunction
" vim:set sw=2: