Mercurial > vim
annotate runtime/ftplugin/sass.vim @ 29326:1f1d99bba06c v9.0.0006
patch 9.0.0006: not all Visual Basic files are recognized
Commit: https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 29 14:39:12 2022 +0100
patch 9.0.0006: not all Visual Basic files are recognized
Problem: Not all Visual Basic files are recognized.
Solution: Change detection of *.cls files. (Doug Kearns)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jun 2022 15:45:03 +0200 |
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: |