]> Pileus Git - vpaste/blob - 2html.patch
adding spam folder
[vpaste] / 2html.patch
1 --- /home/andy/.vim/syntax/2html.vim    2009-10-10 15:32:39.000000000 +0000
2 +++ /usr/share/vim/vim72/syntax/2html.vim       2009-06-16 06:24:31.000000000 +0000
3 @@ -192,6 +192,7 @@
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 @@ -244,7 +245,7 @@
12  " HTML header, with the title and generator ;-). Left free space for the CSS,
13  " to be filled at the end.
14  exe "normal! a<html>\n\e"
15 -exe "normal! a<head>\n<title>" . &titlestring . "</title>\n\e"
16 +exe "normal! a<head>\n<title>" . expand("%:p:~") . "</title>\n\e"
17  exe "normal! a<meta name=\"Generator\" content=\"Vim/" . v:version/100 . "." . v:version %100 . '"' . s:tag_close . "\n\e"
18  if s:html_encoding != ""
19    exe "normal! a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . '"' . s:tag_close . "\n\e"
20 @@ -392,16 +393,12 @@
21  
22        " Expand tabs
23        let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
24 -      if &et
25 -        let idx = stridx(s:expandedtab, "\t")
26 -        while idx >= 0
27 -          let i = &ts - ((idx + s:startcol - 1) % &ts)
28 -          let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', i), '')
29 -          let idx = stridx(s:expandedtab, "\t")
30 -        endwhile
31 -      else
32 -        setlocal isprint+=9
33 -      endif
34 +      let idx = stridx(s:expandedtab, "\t")
35 +      while idx >= 0
36 +       let i = &ts - ((idx + s:startcol - 1) % &ts)
37 +       let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', i), '')
38 +       let idx = stridx(s:expandedtab, "\t")
39 +      endwhile
40  
41        " Output the text with the same synID, with class set to {s:id_name}
42        let s:id = synIDtrans(s:id)