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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
1 " Vim filetype plugin
2415
8f017e31750f Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
2 " Language: Sass
8f017e31750f Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
4 " Last Change: 2019 Dec 05
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
5
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
8 finish
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
9 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
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
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
13
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2415
diff changeset
14 setlocal comments=://
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
15 setlocal commentstring=//\ %s
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
16 setlocal includeexpr=SassIncludeExpr(v:fname)
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
17 setlocal omnifunc=csscomplete#CompleteCSS
2415
8f017e31750f Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
18 setlocal suffixesadd=.sass,.scss,.css
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
19 if &filetype =~# '\<s[ac]ss]\>'
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
20 setlocal iskeyword+=-
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
21 setlocal iskeyword+=$
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
22 setlocal iskeyword+=%
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
23 let b:undo_ftplugin .= ' isk<'
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
24 endif
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
25
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
26 let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@='
2415
8f017e31750f Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
27 let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
28
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
29 function! SassIncludeExpr(file) abort
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
30 let partial = substitute(a:file, '\%(.*/\|^\)\zs', '_', '')
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
31 if !empty(findfile(partial))
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
32 return partial
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
33 endif
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
34 return a:file
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
35 endfunction
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
36
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
37 " vim:set sw=2: