Mercurial > vim
view runtime/ftplugin/sass.vim @ 35080:fcc356d45610 default tip
Added tag v9.1.0381 for changeset 40c314f639cf1a3d7988a689edb1f3152dc55ff4
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 29 Apr 2024 20:45:04 +0200 |
parents | 92fd65eac53a |
children |
line wrap: on
line source
" Vim filetype plugin " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2023 Dec 28 " 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 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 if get(g:, 'sass_recommended_style', 1) setlocal shiftwidth=2 softtabstop=2 expandtab let b:undo_ftplugin .= ' sw< sts< et<' 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: