Mercurial > vim
comparison runtime/indent/sass.vim @ 2202:f7579a31705c vim73
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 21 May 2010 12:05:36 +0200 |
parents | 0b796e045c42 |
children | 2eb30f341e8d |
comparison
equal
deleted
inserted
replaced
2201:4c6b4298852f | 2202:f7579a31705c |
---|---|
1 " Vim indent file | 1 " Vim indent file |
2 " Language: SASS | 2 " Language: Sass |
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.info> | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
4 " Last Change: 2007 Dec 16 | 4 " Last Change: 2010 May 21 |
5 | 5 |
6 if exists("b:did_indent") | 6 if exists("b:did_indent") |
7 finish | 7 finish |
8 endif | 8 endif |
9 let b:did_indent = 1 | 9 let b:did_indent = 1 |
15 " Only define the function once. | 15 " Only define the function once. |
16 if exists("*GetSassIndent") | 16 if exists("*GetSassIndent") |
17 finish | 17 finish |
18 endif | 18 endif |
19 | 19 |
20 let s:property = '^\s*:\|^\s*[[:alnum:]-]\+:' | 20 let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)' |
21 | 21 |
22 function! GetSassIndent() | 22 function! GetSassIndent() |
23 let lnum = prevnonblank(v:lnum-1) | 23 let lnum = prevnonblank(v:lnum-1) |
24 let line = substitute(getline(lnum),'\s\+$','','') | 24 let line = substitute(getline(lnum),'\s\+$','','') |
25 let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') | 25 let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') |