]> Pileus Git - vpaste/blob - 2html-et.patch
updating vpaste
[vpaste] / 2html-et.patch
1 --- /usr/share/vim/vim72/syntax/2html.vim       2009-06-16 06:24:31.000000000 +0000
2 +++ /tmp/2html.vim      2009-10-06 23:05:11.000000000 +0000
3 @@ -192,7 +192,6 @@
4  let s:old_report = &report
5  let s:old_search = @/
6  set notitle noicon
7 -setlocal et
8  set report=1000000
9  
10  " Split window to create a buffer with the HTML file.
11 @@ -393,12 +392,16 @@
12  
13        " Expand tabs
14        let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
15 -      let idx = stridx(s:expandedtab, "\t")
16 -      while idx >= 0
17 -       let i = &ts - ((idx + s:startcol - 1) % &ts)
18 -       let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', i), '')
19 -       let idx = stridx(s:expandedtab, "\t")
20 -      endwhile
21 +      if &et
22 +        let idx = stridx(s:expandedtab, "\t")
23 +        while idx >= 0
24 +          let i = &ts - ((idx + s:startcol - 1) % &ts)
25 +          let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', i), '')
26 +          let idx = stridx(s:expandedtab, "\t")
27 +        endwhile
28 +      else
29 +        setlocal isprint+=9
30 +      endif
31  
32        " Output the text with the same synID, with class set to {s:id_name}
33        let s:id = synIDtrans(s:id)