comparison runtime/doc/syntax.txt @ 3099:887d6d91882e

Updated a few runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 21 Sep 2011 19:22:10 +0200
parents f2de38a019a2
children 37ecb8ff4560
comparison
equal deleted inserted replaced
3098:cabd149477b2 3099:887d6d91882e
1 *syntax.txt* For Vim version 7.3. Last change: 2011 Jul 18 1 *syntax.txt* For Vim version 7.3. Last change: 2011 Sep 21
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2603 let sh_maxlines = 100 2603 let sh_maxlines = 100
2604 < 2604 <
2605 The default is to use the twice sh_minlines. Set it to a smaller number to 2605 The default is to use the twice sh_minlines. Set it to a smaller number to
2606 speed up displaying. The disadvantage is that highlight errors may appear. 2606 speed up displaying. The disadvantage is that highlight errors may appear.
2607 2607
2608 2608 *g:sh_isk* *g:sh_noisk*
2609 SPEEDUP (AspenTech plant simulator) *spup.vim* *ft-spup-syntax* 2609 The shell languages appear to let "." be part of words, commands, etc;
2610 consequently it should be in the isk for sh.vim. As of v116 of syntax/sh.vim,
2611 syntax/sh.vim will append the "." to |'iskeyword'| by default; you may control
2612 this behavior with: >
2613 let g:sh_isk = '..whatever characters you want as part of iskeyword'
2614 let g:sh_noisk= 1 " otherwise, if this exists, the isk will NOT chg
2615 <
2616 *sh-embed* *sh-awk*
2617 Sh: EMBEDDING LANGUAGES~
2618
2619 You may wish to embed languages into sh. I'll give an example courtesy of
2620 Lorance Stinson on how to do this with awk as an example. Put the following
2621 file into $HOME/.vim/after/syntax/sh/awkembed.vim: >
2622
2623 " AWK Embedding: {{{1
2624 " ==============
2625 " Shamelessly ripped from aspperl.vim by Aaron Hope.
2626 if exists("b:current_syntax")
2627 unlet b:current_syntax
2628 endif
2629 syn include @AWKScript syntax/awk.vim
2630 syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained
2631 syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode
2632 syn cluster shCommandSubList add=AWKScriptEmbedded
2633 hi def link AWKCommand Type
2634 <
2635 This code will then let the awk code in the single quotes: >
2636 awk '...awk code here...'
2637 be highlighted using the awk highlighting syntax. Clearly this may be
2638 extended to other languages.
2639
2640
2641 SPEEDUP *spup.vim* *ft-spup-syntax*
2642 (AspenTech plant simulator)
2610 2643
2611 The Speedup syntax file has some options: 2644 The Speedup syntax file has some options:
2612 2645
2613 - strict_subsections : If this variable is defined, only keywords for 2646 - strict_subsections : If this variable is defined, only keywords for
2614 sections and subsections will be highlighted as statements but not 2647 sections and subsections will be highlighted as statements but not
2687 sections, subsections, etc are supported. Put > 2720 sections, subsections, etc are supported. Put >
2688 let g:tex_fold_enabled=1 2721 let g:tex_fold_enabled=1
2689 in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a 2722 in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
2690 modeline at the end of your LaTeX file: > 2723 modeline at the end of your LaTeX file: >
2691 % vim: fdm=syntax 2724 % vim: fdm=syntax
2725 If your system becomes too slow, then you might wish to look into >
2726 https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
2692 < 2727 <
2693 *tex-nospell* 2728 *tex-nospell*
2694 Tex: Don't Want Spell Checking In Comments? ~ 2729 Tex: Don't Want Spell Checking In Comments? ~
2695 2730
2696 Some folks like to include things like source code in comments and so would 2731 Some folks like to include things like source code in comments and so would
2726 :syn sync maxlines=200 2761 :syn sync maxlines=200
2727 :syn sync minlines=50 2762 :syn sync minlines=50
2728 (especially the latter). If your computer is fast, you may wish to 2763 (especially the latter). If your computer is fast, you may wish to
2729 increase them. This primarily affects synchronizing (i.e. just what group, 2764 increase them. This primarily affects synchronizing (i.e. just what group,
2730 if any, is the text at the top of the screen supposed to be in?). 2765 if any, is the text at the top of the screen supposed to be in?).
2766
2767 Another cause of slow highlighting is due to syntax-driven folding; see
2768 |tex-folding| for a way around this.
2731 2769
2732 *tex-morecommands* *tex-package* 2770 *tex-morecommands* *tex-package*
2733 Tex: Want To Highlight More Commands? ~ 2771 Tex: Want To Highlight More Commands? ~
2734 2772
2735 LaTeX is a programmable language, and so there are thousands of packages full 2773 LaTeX is a programmable language, and so there are thousands of packages full