Mercurial > vim
comparison runtime/ftplugin/sass.vim @ 18818:5c40013d45ee
Update runtime files.
Commit: https://github.com/vim/vim/commit/c08ee7476b19f9b4de5df287797af87c4e3fba0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 5 22:47:25 2019 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 Dec 2019 23:00:04 +0100 |
parents | 43efa4f5a8ea |
children | 92fd65eac53a |
comparison
equal
deleted
inserted
replaced
18817:17aefb9d7c45 | 18818:5c40013d45ee |
---|---|
1 " Vim filetype plugin | 1 " Vim filetype plugin |
2 " Language: Sass | 2 " Language: Sass |
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
4 " Last Change: 2016 Aug 29 | 4 " Last Change: 2019 Dec 05 |
5 | 5 |
6 " Only do this when not done yet for this buffer | 6 " Only do this when not done yet for this buffer |
7 if exists("b:did_ftplugin") | 7 if exists("b:did_ftplugin") |
8 finish | 8 finish |
9 endif | 9 endif |
11 | 11 |
12 let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" | 12 let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" |
13 | 13 |
14 setlocal comments=:// | 14 setlocal comments=:// |
15 setlocal commentstring=//\ %s | 15 setlocal commentstring=//\ %s |
16 setlocal define=^\\s*\\%(@mixin\\\|=\\) | 16 setlocal includeexpr=SassIncludeExpr(v:fname) |
17 setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') | |
18 setlocal omnifunc=csscomplete#CompleteCSS | 17 setlocal omnifunc=csscomplete#CompleteCSS |
19 setlocal suffixesadd=.sass,.scss,.css | 18 setlocal suffixesadd=.sass,.scss,.css |
19 if &filetype =~# '\<s[ac]ss]\>' | |
20 setlocal iskeyword+=- | |
21 setlocal iskeyword+=$ | |
22 setlocal iskeyword+=% | |
23 let b:undo_ftplugin .= ' isk<' | |
24 endif | |
20 | 25 |
26 let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@=' | |
21 let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' | 27 let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' |
22 | 28 |
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 | |
23 " vim:set sw=2: | 37 " vim:set sw=2: |