Mercurial > vim
annotate runtime/ftplugin/sass.vim @ 28042:e98a8383668f
Added tag v8.2.4545 for changeset 64f78eb337ea634824f805ad3ce5abcb994ea2ae
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 11 Mar 2022 16:30:04 +0100 |
parents | 5c40013d45ee |
children | 92fd65eac53a |
rev | line source |
---|---|
1668 | 1 " Vim filetype plugin |
2415 | 2 " Language: Sass |
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> | |
18818 | 4 " Last Change: 2019 Dec 05 |
1668 | 5 |
6 " Only do this when not done yet for this buffer | |
7 if exists("b:did_ftplugin") | |
8 finish | |
9 endif | |
10 let b:did_ftplugin = 1 | |
11 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2415
diff
changeset
|
12 let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" |
1668 | 13 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2415
diff
changeset
|
14 setlocal comments=:// |
1668 | 15 setlocal commentstring=//\ %s |
18818 | 16 setlocal includeexpr=SassIncludeExpr(v:fname) |
1668 | 17 setlocal omnifunc=csscomplete#CompleteCSS |
2415 | 18 setlocal suffixesadd=.sass,.scss,.css |
18818 | 19 if &filetype =~# '\<s[ac]ss]\>' |
20 setlocal iskeyword+=- | |
21 setlocal iskeyword+=$ | |
22 setlocal iskeyword+=% | |
23 let b:undo_ftplugin .= ' isk<' | |
24 endif | |
1668 | 25 |
18818 | 26 let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@=' |
2415 | 27 let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' |
1668 | 28 |
18818 | 29 function! SassIncludeExpr(file) abort |
30 let partial = substitute(a:file, '\%(.*/\|^\)\zs', '_', '') | |
31 if !empty(findfile(partial)) | |
32 return partial | |
33 endif | |
34 return a:file | |
35 endfunction | |
36 | |
1668 | 37 " vim:set sw=2: |