Update runtime files.
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user