Skip to content

Commit e8f41f9

Browse files
committed
Updated runtime files.
1 parent 4cb3039 commit e8f41f9

24 files changed

+501
-133
lines changed

runtime/autoload/htmlcomplete.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim completion script
22
" Language: HTML and XHTML
33
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
4-
" Last Change: 2006 Oct 19
4+
" Last Change: 2011 Apr 28
55

66
function! htmlcomplete#CompleteTags(findstart, base)
77
if a:findstart
@@ -285,6 +285,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
285285
let cssfiles = styletable + secimportfiles
286286
let classes = []
287287
for file in cssfiles
288+
let classlines = []
288289
if filereadable(file)
289290
let stylesheet = readfile(file)
290291
let stylefile = join(stylesheet, ' ')

runtime/autoload/tohtml.vim

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim autoload file for the tohtml plugin.
22
" Maintainer: Ben Fritz <[email protected]>
3-
" Last Change: 2011 Jan 05
3+
" Last Change: 2011 Apr 05
44
"
55
" Additional contributors:
66
"
@@ -16,7 +16,7 @@ set cpo-=C
1616
" Automatically find charsets from all encodings supported natively by Vim. With
1717
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
1818
" this. Let the user specify these however since they won't be supported on
19-
" every system. TODO: how? g:html_charsets and g:html_encodings?
19+
" every system.
2020
"
2121
" Note, not all of Vim's supported encodings have a charset to use.
2222
"
@@ -312,8 +312,9 @@ func! tohtml#Convert2HTML(line1, line2) "{{{
312312
" figure out whether current charset and encoding will work, if not
313313
" default to UTF-8
314314
if !exists('g:html_use_encoding') &&
315-
\ (&l:fileencoding!='' && &l:fileencoding!=s:settings.vim_encoding ||
316-
\ &l:fileencoding=='' && &encoding!=s:settings.vim_encoding)
315+
\ (((&l:fileencoding=='' || (&l:buftype!='' && &l:buftype!=?'help'))
316+
\ && &encoding!=?s:settings.vim_encoding)
317+
\ || &l:fileencoding!='' && &l:fileencoding!=?s:settings.vim_encoding)
317318
echohl WarningMsg
318319
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
319320
echohl None
@@ -603,6 +604,7 @@ func! tohtml#GetUserSettings() "{{{
603604
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
604605
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
605606
call tohtml#GetOption(user_settings, 'number_lines', &number )
607+
call tohtml#GetOption(user_settings, 'pre_wrap', &wrap )
606608
call tohtml#GetOption(user_settings, 'use_css', 1 )
607609
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
608610
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
@@ -641,7 +643,13 @@ func! tohtml#GetUserSettings() "{{{
641643
" aren't allowed inside a <pre> block
642644
if !user_settings.use_css
643645
let user_settings.no_pre = 1
644-
endif "}}}
646+
endif
647+
648+
" pre_wrap doesn't do anything if not using pre or not using CSS
649+
if user_settings.no_pre || !user_settings.use_css
650+
let user_settings.pre_wrap=0
651+
endif
652+
"}}}
645653

646654
" set up expand_tabs option after all the overrides so we know the
647655
" appropriate defaults {{{
@@ -669,9 +677,16 @@ func! tohtml#GetUserSettings() "{{{
669677
endif
670678
else
671679
" Figure out proper MIME charset from 'fileencoding' if possible
672-
if &l:fileencoding != ''
673-
let user_settings.vim_encoding = &l:fileencoding
674-
call tohtml#CharsetFromEncoding(user_settings)
680+
if &l:fileencoding != ''
681+
" If the buffer is not a "normal" type, the 'fileencoding' value may not
682+
" be trusted; since the buffer should not be written the fileencoding is
683+
" not intended to be used.
684+
if &l:buftype=='' || &l:buftype==?'help'
685+
let user_settings.vim_encoding = &l:fileencoding
686+
call tohtml#CharsetFromEncoding(user_settings)
687+
else
688+
let user_settings.encoding = '' " trigger detection using &encoding
689+
endif
675690
endif
676691

677692
" else from 'encoding' if possible

runtime/compiler/cs.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
" Vim compiler file
2-
" Compiler: ms C#
3-
" Maintainer: Joseph H. Yao ([email protected])
4-
" Last Change: 2004 Mar 27
2+
" Compiler: Microsoft Visual Studio C#
3+
" Maintainer: Zhou YiChao ([email protected])
4+
" Previous Maintainer: Joseph H. Yao ([email protected])
5+
" Last Change: 2011 Apr 21
56

67
if exists("current_compiler")
78
finish
@@ -12,8 +13,9 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
1213
command -nargs=* CompilerSet setlocal <args>
1314
endif
1415

15-
" default errorformat
1616
CompilerSet errorformat&
17+
CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
18+
\%trror%*[^:]:\ %m,
19+
\%tarning%*[^:]:\ %m
1720

18-
" default make
1921
CompilerSet makeprg=csc\ %

runtime/doc/autocmd.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 7.3. Last change: 2010 Jul 22
1+
*autocmd.txt* For Vim version 7.3. Last change: 2011 Apr 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -786,7 +786,10 @@ TermChanged After the value of 'term' has changed. Useful
786786
TermResponse After the response to |t_RV| is received from
787787
the terminal. The value of |v:termresponse|
788788
can be used to do things depending on the
789-
terminal version.
789+
terminal version. Note that this event may be
790+
triggered halfway executing another event,
791+
especially if file I/O, a shell command or
792+
anything else that takes time is involved.
790793
*User*
791794
User Never executed automatically. To be used for
792795
autocommands that are only executed with

runtime/doc/diff.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 7.3. Last change: 2010 Dec 08
1+
*diff.txt* For Vim version 7.3. Last change: 2011 Apr 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -167,8 +167,8 @@ in diff mode in one window and "normal" in another window. It is also
167167
possible to view the changes you have made to a buffer since the file was
168168
loaded. Since Vim doesn't allow having two buffers for the same file, you
169169
need another buffer. This command is useful: >
170-
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
171-
\ | wincmd p | diffthis
170+
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
171+
\ | diffthis | wincmd p | diffthis
172172
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
173173
between the current buffer and the file it was loaded from.
174174

runtime/doc/indent.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*indent.txt* For Vim version 7.3. Last change: 2011 Mar 18
1+
*indent.txt* For Vim version 7.3. Last change: 2011 Apr 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -472,6 +472,8 @@ assume a 'shiftwidth' of 4.
472472

473473
*N Vim searches for unclosed comments at most N lines away. This
474474
limits the time needed to search for the start of a comment.
475+
If your /* */ comments stop indenting afer N lines this is the
476+
value you will want to change.
475477
(default 70 lines).
476478

477479
#N When N is non-zero recognize shell/Perl comments, starting with

runtime/doc/map.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*map.txt* For Vim version 7.3. Last change: 2010 Nov 10
1+
*map.txt* For Vim version 7.3. Last change: 2011 Apr 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1291,7 +1291,8 @@ Possible attributes are:
12911291
-range Range allowed, default is current line
12921292
-range=% Range allowed, default is whole file (1,$)
12931293
-range=N A count (default N) which is specified in the line
1294-
number position (like |:split|)
1294+
number position (like |:split|); allows for zero line
1295+
number.
12951296
-count=N A count (default N) which is specified either in the line
12961297
number position, or as an initial argument (like |:Next|).
12971298
Specifying -count (without a default) acts like -count=0

runtime/doc/options.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 7.3. Last change: 2011 Mar 22
1+
*options.txt* For Vim version 7.3. Last change: 2011 Apr 15
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5907,9 +5907,10 @@ A jump table for the options with a short description can be found at |Q_op|.
59075907
For Unix the default it "| tee". The stdout of the compiler is saved
59085908
in a file and echoed to the screen. If the 'shell' option is "csh" or
59095909
"tcsh" after initializations, the default becomes "|& tee". If the
5910-
'shell' option is "sh", "ksh", "zsh" or "bash" the default becomes
5911-
"2>&1| tee". This means that stderr is also included. Before using
5912-
the 'shell' option a path is removed, thus "/bin/sh" uses "sh".
5910+
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh" or "bash" the
5911+
default becomes "2>&1| tee". This means that stderr is also included.
5912+
Before using the 'shell' option a path is removed, thus "/bin/sh" uses
5913+
"sh".
59135914
The initialization of this option is done after reading the ".vimrc"
59145915
and the other initializations, so that when the 'shell' option is set
59155916
there, the 'shellpipe' option changes automatically, unless it was

runtime/doc/pattern.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pattern.txt* For Vim version 7.3. Last change: 2011 Feb 25
1+
*pattern.txt* For Vim version 7.3. Last change: 2011 Apr 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -651,6 +651,13 @@ overview.
651651
"foobar" you could use "\(foo\)\@!...bar", but that doesn't match a
652652
bar at the start of a line. Use "\(foo\)\@<!bar".
653653

654+
Useful example: to find "foo" in a line that does not contain "bar": >
655+
/^\%(.*bar\)\@!.*\zsfoo
656+
< This pattern first checks that there is not a single position in the
657+
line where "bar" matches. If ".*bar" matches somewhere the \@! will
658+
reject the pattern. When there is no match any "foo" will be found.
659+
The "\zs" is to have the match start just before "foo".
660+
654661
*/\@<=*
655662
\@<= Matches with zero width if the preceding atom matches just before what
656663
follows. |/zero-width| {not in Vi}

runtime/doc/syntax.txt

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 7.3. Last change: 2011 Apr 01
1+
*syntax.txt* For Vim version 7.3. Last change: 2011 Apr 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -468,18 +468,28 @@ disabled javascript to view closed folds. To use this option, use: >
468468
Setting html_no_foldcolumn with html_dynamic_folds will automatically set
469469
html_hover_unfold, because otherwise the folds wouldn't be dynamic.
470470

471-
By default "<pre>" and "</pre>" is used around the text. This makes it show
472-
up as you see it in Vim, but without wrapping. If you prefer wrapping, at the
473-
risk of making some things look a bit different, use: >
471+
By default "<pre>" and "</pre>" are used around the text. When 'wrap' is set
472+
in the window being converted, the CSS 2.0 "white-space:pre-wrap" value is
473+
used to wrap the text. You can explicitly enable the wrapping with: >
474+
:let g:html_pre_wrap = 1
475+
or disable with >
476+
:let g:html_pre_wrap = 0
477+
This generates HTML that looks very close to the Vim window, but unfortunately
478+
there can be minor differences such as the lack of a 'showbreak' option in in
479+
the HTML, or where line breaks can occur.
480+
481+
Another way to obtain text wrapping in the HTML, at the risk of making some
482+
things look even more different, is to use: >
474483
:let g:html_no_pre = 1
475484
This will use <br> at the end of each line and use "&nbsp;" for repeated
476-
spaces.
485+
spaces. Doing it this way is more compatible with old browsers, but modern
486+
browsers support the "white-space" method.
477487

478-
If you do use the "<pre>" tags, <Tab> characters in the text are included in
479-
the generated output if they will have no effect on the appearance of the
480-
text and it looks like they are in the document intentionally. This allows for
481-
the HTML output to be copied and pasted from a browser without losing the
482-
actual whitespace used in the document.
488+
If you do stick with the default "<pre>" tags, <Tab> characters in the text
489+
are included in the generated output if they will have no effect on the
490+
appearance of the text and it looks like they are in the document
491+
intentionally. This allows for the HTML output to be copied and pasted from a
492+
browser without losing the actual whitespace used in the document.
483493

484494
Specifically, <Tab> characters will be included if the 'tabstop' option is set
485495
to the default of 8, 'expandtab' is not set, and if neither the foldcolumn nor
@@ -502,13 +512,14 @@ inserted lines as with the side-by-side diff, use: >
502512
:let g:html_whole_filler = 1
503513
And to go back to displaying up to three lines again: >
504514
:unlet g:html_whole_filler
505-
<
506-
TOhtml uses the current value of 'fileencoding' if set, or 'encoding' if not,
507-
to determine the charset and 'fileencoding' of the HTML file. In general, this
508-
works for the encodings mentioned specifically by name in |encoding-names|, but
509-
TOhtml will only automatically use those encodings which are widely supported.
510-
However, you can override this to support specific encodings that may not be
511-
automatically detected by default.
515+
516+
For most buffers, TOhtml uses the current value of 'fileencoding' if set, or
517+
'encoding' if not, to determine the charset and 'fileencoding' of the HTML
518+
file. 'encoding' is always used for certain 'buftype' values. In general, this
519+
works for the encodings mentioned specifically by name in |encoding-names|,
520+
but TOhtml will only automatically use those encodings which are widely
521+
supported. However, you can override this to support specific encodings that
522+
may not be automatically detected by default.
512523

513524
To overrule all automatic charset detection, set g:html_use_encoding to the
514525
name of the charset to be used. TOhtml will try to determine the appropriate

0 commit comments

Comments
 (0)