⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syntax.txt

📁 MSYS在windows下模拟了一个类unix的终端
💻 TXT
📖 第 1 页 / 共 5 页
字号:
the most prevalent version currently.Note, not all PS interpreters will support all language features for aparticular language level.  In particular the %!PS-Adobe-3.0 at the start ofPS files does NOT mean the PostScript present is level 3 PostScript!If you are working with Display PostScript, you can include highlighting ofDisplay PS language features by defining the postscr_display variable asfollows:>  let postscr_display=1If you are working with Ghostscript, you can include highlighting ofGhostscript specific language features by defining the variablepostscr_ghostscript as follows:>  let postscr_ghostscript=1PostScript is a large language, with many predefined elements.  While ituseful to have all these elements highlighted, on slower machines this cancause Vim to slow down.  In an attempt to be machine friendly font names andcharacter encodings are not highlighted by default.  Unless you are workingexplicitly with either of these this should be ok.  If you want them to behighlighted you should set one or both of the following variables:>  let postscr_fonts=1>  let postscr_encodings=1There is a stylistic option to the highlighting of and, or, and not.  InPostScript the function of these operators depends on the types of theiroperands - if the operands are booleans then they are the logical operators,if they are integers then they are binary operators.  As binary and logicaloperators can be highlighted differently they have to be highlighted one wayor the other.  By default they are treated as logical operators.  They can behighlighted as binary operators by defining the variablepostscr_andornot_binary as follows:>  let postscr_andornot_binary=1PRINTCAP + TERMCAP		*ptcap.vim* *termcap-syntax* *printcap-syntax*This syntax file applies to the printcap and termcap databases.In order for Vim to recognize printcap/termcap files that do not matchthe patterns *printcap*, or *termcap*, you must put additional patternsappropriate to your system in your |myfiletypefile| file.  For thesepatterns, you must set the variable "b:ptcap_type" to either "print" or"term", and then the 'filetype' option to ptcap.For example, to make Vim identify all files in /etc/termcaps/ as termcapfiles, add the following:>  au BufNewFile,BufRead /etc/termcaps/* let b:ptcap_type = "term" |>                                       \ set filetype=ptcapIf you notice highlighting errors while scrolling backwards, whichare fixed when redrawing with CTRL-L, try setting the "ptcap_minlines"internal variable to a larger number:  let ptcap_minlines = 50(The default is 20 lines.)PROGRESS					*progress.vim*Files matching "*.w" could be Progress or cweb.  If the automatic detectiondoesn't work for you, or you don't edit cweb at all, use this in yourstartup vimrc:>   :let filetype_w = "progress"The same happens for "*.i", which could be assembly, and "*.p", which could bePascal.  Use this if you don't use assembly and Pascal:>   :let filetype_i = "progress">   :let filetype_p = "progress"PYTHON							*python.vim*There are four options to control Python syntax highlighting.For highlighted numbers:>  let python_highlight_numbers = 1For highlighted builtin functions:>  let python_highlight_builtins = 1For highlighted standard exceptions:>  let python_highlight_exceptions = 1If you want all possible Python highlighting (the same as setting thepreceding three options):>  let python_highlight_all = 1REXX							*rexx.vim*If you notice highlighting errors while scrolling backwards, which are fixedwhen redrawing with CTRL-L, try setting the "rexx_minlines" internal variableto a larger number:>  let rexx_minlines = 50This will make the syntax synchronization start 50 lines before the firstdisplayed line.  The default value is 10.  The disadvantage of using a largernumber is that redrawing can become slow.RUBY							*ruby.vim*There are a few options to the Ruby syntax highlighting.By default, the "end" keyword is colorized according to the opening statementof the block it closes. While useful, this feature can be expensive: if youexperience slow redrawing (or you are on a terminal with poor color support)you may want to turn it off by defining the "ruby_no_expensive" variable:>   let ruby_no_expensive = 1In this case the same color will be used for all control keywords.If you do want this feature enabled, but notice highlighting errors whilescrolling backwards, which are fixed when redrawing with CTRL-L, try settingthe "ruby_minlines" variable to a value larger than 50:>   let ruby_minlines = 100Ideally, this value should be a number of lines large enough to embrace yourlargest class or module.Finally, if you do not like to see too many color items around, you can define"ruby_no_identifiers":>   let ruby_no_identifiers = 1This will prevent highlighting of special identifiers like "ConstantName","$global_var", "@instace_var", "| iterator |", and ":symbol".SED							*sed.vim*To make tabs stand out from regular blanks (accomplished by using Todohighlighting on the tabs), define "highlight_sedtabs" by putting>  let highlight_sedtabs = 1in the vimrc file.  (This special highlighting only applies for tabsinside search patterns, replacement texts, addresses or text includedby an Append/Change/Insert command.)  If you enable this option, it isalso a good idea to set the tab width to one character; by doing that,you can easily count the number of tabs in a string.Bugs:  The transform command (y) is treated exactly like the substitute  command.  This means that, as far as this syntax file is concerned,  transform accepts the same flags as substitute, which is wrong.  (Transform accepts no flags.)  I tolerate this bug because the  involved commands need very complex treatment (95 patterns, one for  each plausible pattern delimiter).SGML							*sgml.vim*The coloring scheme for tags in the SGML file works as follows.The <> of opening tags are colored differently than the </> of a closing tag.This is on purpose! For opening tags the 'Function' color is used, while forclosing tags the 'Type' color is used (See syntax.vim to check how those aredefined for you)Known tag names are colored the same way as statements in C.  Unknown tagnames are not colored which makes it easy to spot errors.Note that the same is true for argument (or attribute) names. Known attributenames are colored differently than unknown ones.Some SGML tags are used to change the rendering of text. The following tagsare recognized by the sgml.vim syntax coloring file and change the way normaltext is shown: <varname> <emphasis> <command> <function> <literal><replaceable> <ulink> and <link>.If you want to change how such text is rendered, you must redefine thefollowing syntax groups:    - sgmlBold    - sgmlBoldItalic    - sgmlUnderline    - sgmlItalic    - sgmlLink for linksTo make this redefinition work you must redefine them all and define thefollowing variable in your vimrc (this is due to the order in which the filesare read during initialization)>   let sgml_my_rendering=1You can also disable this rendering by adding the following line to yourvimrc file:>   let sgml_no_rendering=1(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)SH							*sh.vim*This covers the "normal" Unix sh, bash and the korn shell.  If you're workingon a system where bash is called sh, you will benefit to define the vimvariable 'bash_is_sh' in your '.vimrc' file:>  let bash_is_sh = 1If some buffers use bash for sh, use the buffer-local variable:>  let b:is_bash = 1You can force using the korn shell by sett a buffer-local variable:>  let b:is_kornshell = 1To choose between the two ways to treat single-quotes inside a pair ofdouble-quotes, I have introduced a Vim variable "highlight_balanced_quotes".By default (ie by not declaring this variable) single quotes can be usedinside double quotes, and are not highlighted.  If you prefer balanced singlequotes as I do you just make the statement in your .vimrc file:>  let highlight_balanced_quotes = 1Similar I have introduced another vim variable "highlight_function_name" to beused to enable/disable highlighting of the function-name in functiondeclaration.  Default is not to highlight the function name.  If you want tohighlight functions names, include this in your .vimrc file:>  let highlight_function_name = 1If you notice highlighting errors while scrolling backwards, which are fixedwhen redrawing with CTRL-L, try setting the "sh_minlines" internal variableto a larger number:>  let sh_minlines = 200This will make the syntax synchronization start 200 lines before the firstdisplayed line.  The default value is 100.  The disadvantage of using a largernumber is that redrawing can become slow.If you don't have much to synchronize on, displaying can be very slow.  Toreduce this, the "sh_maxlines" internal variable can be set:>  let sh_maxlines = 100The default is to use the double of "sh_minlines".  Set it to a smaller numberto speed up displaying.  The disadvantage is that highlight errors may appear.SPEEDUP (AspenTech plant simulator)				*spup.vim*The Speedup syntax file has some options:- strict_subsections : If this variable is defined, only keywords for  sections and subsections will be highlighted as statements but not  other keywords (like WITHIN in the OPERATION section).- highlight_types : Definition of this variable causes stream types  like temperature or pressure to be highlighted as Type, not as a  plain Identifier. Included are the types that are usually found in  the DECLARE section; if you defined own types, you have to include  them in the syntax file.- oneline_comments : this value ranges from 1 to 3 and determines the  highlighting of # style comments.  oneline_comments = 1 : allow normal Speedup code after an even  number of #s.  oneline_comments = 2 : show code starting with the second # as  error. This is the default setting.  oneline_comments = 3 : show the whole line as error if it contains  more than one #.Since especially OPERATION sections tend to become very large due toPRESETting variables, syncing may be critical. If your computer isfast enough, you can increase minlines and/or maxlines near the end ofthe syntax file.TEX							*tex.vim*The tex highlighting supports TeX, LaTeX, and some AmsTeX.  Thehighlighting supports three primary zones: normal, texZone, and texMathZone.Although a considerable effort has been made to have these zones terminateproperly, zones delineated by $..$ and $$..$$ cannot be synchronized asthere's no difference between start and end patterns.  Consequently, aspecial "TeX comment" has been provided> %stopzonewhich will forcibly terminate the highlighting of either a texZone or atexMathZone.If you have a slow computer, you may wish to reduce the values for>  syn sync maxlines=200>  syn sync minlines=50(especially the latter).  If your computer is fast, you may wish toincrease them.  This primarily affects synchronizing (ie. just what group,if any, is the text at the top of the screen supposed to be in?).The <tex.vim> supports lexical error checking of various sorts.  Thus,although the error checking is ofttimes very useful, it can indicateerrors where none actually are.  If this proves to be a problem for you,you may put in your <.vimrc> the following statement:>  let tex_no_error=1and all error checking by <tex.vim> will be suppressed.TF							*tf.vim*There is one option for the tf syntax highlighting.For syncing, minlines defaults to 100.  If you prefer another value, you canset "tf_minlines" to the value you desire.  Example:>  let tf_minlines = your choiceX Pixmaps (XPM)						*xpm.vim*xpm.vim creates its syntax items dynamically based upon the contents of theXPM file.  Thus if you make changes e.g. in the color specification strings,you have to source it again e.g. with ":set syn=xpm".To copy a pixel with one of the colors, yank a "pixel" with "yl" and insert itsomewhere else with "P".Do you want to draw with the mouse?  Try the following:>   function! GetPixel()>      let c = getline(line("."))[col(".") - 1]>      echo c>      exe "noremap <LeftMouse> <LeftMouse>r".c>      exe "noremap <LeftDrag>  <LeftMouse>r".c>   endfunction>   noremap <RightMouse> <LeftMouse>:call GetPixel()<CR>>   set guicursor=n:hor20          " to see the color beneath the cursorThis turns the right button into a pipette and the left button into a pen.It will work with XPM files that have one character per pixel only and youmust not click outside of the pixel strings, but feel free to improve it.It will look much better with a font in a quadratic cell size, e.g. for X:>   set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*==============================================================================5. Defining a syntax					*:syn-define*Vim understands three types of syntax items:1. A keyword.  It can only contain keyword characters, according to the   'iskeyword' option.  It cannot contain other syntax items.  It will only   be recognized when it is a complete match (there are no keyword   characters before or af

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -