📄 syntax.txt
字号:
However, if you follow the java guidlines about how functions and classes aresupposed to be named (with respect to upper and lower cases), use> let java_highlight_functions="style"If both options do not work for you, but you would still want functiondeclarations to be highlighted create your own definitions by changing thedefinitions in java.vim or by creating your own java.vim which includes theoriginal one and then adds the code to highlight functions.In java 1.1 the functions System.out.println() and System.err.println() shouldonly be used for debugging. Therefor it is possible to highlight debuggingstatements differently. To do this you must add the following definition inyour startup file:> let java_highlight_debug=1The result will be that those statements are highlighted as 'Special'characters. If you prefer to have them highlighted differently you must definenew highlightings for the following groups.: Debug, DebugSpecial, DebugString, DebugBoolean, DebugTypewhich are used for the statement itself, special characters used in debugstrings, strings, boolean constants and types (this, super) respectively. Ihave opted to chose another background for those statements.In order to help you to write code that can be easely ported betweenjava and C++, all C++ keywords are marked as error in a java program.However, if you use them regularly, you may want to define the followingvariable in your .vimrc file:> let java_allow_cpp_keywords=1Javadoc is a program that takes special comments out of java program files andcreates HTML pages. The standard configuration will highlight this HTML codesimilarly to HTML files (see |html.vim|). You can even add javascriptand CSS inside this code (see below). There are four differences however: 1. The title (all characters up to the first '.' which is followed by some white space or up to the first '@') is colored differently (to change the color change the group CommentTitle). 2. The text is colored as 'Comment'. 3. HTML comments are colored as 'Special' 4. The special javadoc tags (@see, @param, ...) are highlighted as specials and the argument (for @see, @param, @exception) as Function.To turn this feature off add the following line to your startup file:> let java_ignore_javadoc=1If you use the special javadoc comment highlighting described above youcan also turn on special highlighting for javascript, visual basicscripts and embedded CSS (stylesheets). This makes only sense if youactually have javadoc comments that include either javascript or embeddedCSS. The options to use are> let java_javascript=1> let java_css=1> let java_vb=1If you notice highlighting errors while scrolling backwards, which are fixedwhen redrawing with CTRL-L, try setting the "java_minlines" internal variableto a larger number:> let java_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.LACE *lace.vim*Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but thestyle guide lines are not. If you prefer case insensitive highlighting, justdefine the vim variable 'lace_case_insensitive' in your startup file:> let lace_case_insensitive=1LEX *lex.vim*Lex uses brute-force synchronizing as the "^%%$" section delimitergives no clue as to what section follows. Consequently, the value for>syn sync minlines=300may be changed by the user if s/he is experiencing synchronizationdifficulties (such as may happen with large lex files).LITE *lite.vim*There are two options for the lite syntax highlighting.If you like SQL syntax highligthing inside Strings, use this:> let lite_sql_query = 1For syncing, minlines defaults to 100. If you prefer another value, you canset "lite_minlines" to the value you desire. Example:> let lite_minlines = 200MAPLE *maple.vim*Maple V, by Waterloo Maple Inc, supports symbolic algebra. The languagesupports many packages of functions which are selectively loaded by the user.The standard set of packages' functions as supplied in Maple V release 4 may behighlighted at the user's discretion. Users may place in their .vimrc file:> let mvpkg_all= 1to get all package functions highlighted, or users may select any subset bychoosing a variable/package from the table below and setting that variable to1, also in their .vimrc file (prior to sourcing$VIMRUNTIME/syntax/syntax.vim). Table of Maple V Package Function Selectors ~> mv_DEtools mv_genfunc mv_networks mv_process> mv_Galois mv_geometry mv_numapprox mv_simplex> mv_GaussInt mv_grobner mv_numtheory mv_stats> mv_LREtools mv_group mv_orthopoly mv_student> mv_combinat mv_inttrans mv_padic mv_sumtools> mv_combstruct mv_liesymm mv_plots mv_tensor> mv_difforms mv_linalg mv_plottools mv_totorder> mv_finance mv_logic mv_powseriesMSQL *msql.vim*There are two options for the msql syntax highlighting.If you like SQL syntax highligthing inside Strings, use this:> let msql_sql_query = 1For syncing, minlines defaults to 100. If you prefer another value, you canset "msql_minlines" to the value you desire. Example:> let msql_minlines = 200NCF *ncf.vim*There is one option for NCF syntax highlighting.If you want to have unrecognized (by ncf.vim) statements highlighted aserrors, use this:> let ncf_highlight_unknowns = 1If you don't want to highlight these errors, leave it unset.NROFF *nroff.vim*To mark trailing spaces as an error, use this:> let nroff_space_errors = 1PASCAL *pascal.vim*Files matching "*.p" could be Progress or Pascal. If the automatic detectiondoesn't work for you, or you don't edit Progress at all, use this in yourstartup vimrc:> :let filetype_p = "pascal" The Pascal syntax file has been extended to take into account some extensionsprovided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.Delphi keywords are also supported. By default, Turbo Pascal 7.0 features areenabled. If you prefer to stick with the standard Pascal keywords, add thefollowing line to your startup file:> :let pascal_traditional=1To switch on Delphi specific constructions (such as one-line comments,keywords, etc):> :let pascal_delphi=1The option pascal_symbol_operator controls whether symbol operators such as +,*, .., etc. are displayed using the Operator color or not. To colorize symboloperators, add the following line to your startup file:> :let pascal_symbol_operator=1Some functions are highlighted by default. To switch it off:> :let pascal_no_functions=1Furthermore, there are specific variable for some compiler. Besidespascal_delphi, there are pascal_gpc and pascal_fpc. Default extensions try tomatch Turbo Pascal.> :let pascal_gpc=1or> :let pascal_fpc=1To ensure that strings are defined on a single line, you can define thepascal_one_line_string variable.> :let pascal_one_line_string=1If you dislike <Tab> chars, you can set the pascal_no_tabs variable. Tabswill be highlighted as Error.> :let pascal_no_tabs=1PERL *perl.vim*There are a number of possible options to the perl syntax highlighting.If you use POD files or POD segments, you might:> let perl_include_POD = 1To handle package references in variable and function names differently fromthe rest of the name (like 'PkgName::' in '$PkgName::VarName'):> let perl_want_scope_in_variables = 1If you want complex things like '@{${"foo"}}' to be parsed:> let perl_extended_vars = 1The coloring strings can be changed. By default strings and qq friends will behighlighted like the first line. If you set the variableperl_string_as_statement, it will be highlighted as in the second line. "hello world!"; qq|hello world|; ^^^^^^^^^^^^^^NN^^^^^^^^^^^^^^^N (unlet perl_string_as_statement) S^^^^^^^^^^^^SNNSSS^^^^^^^^^^^^N (let perl_string_as_statement)(^ = perlString, S = perlStatement, N = None at all)The syncing has 3 options. The first two switch off some triggering ofsynchronization and should only be needed in case it fails to work properly.If while scrolling all of a sudden the whole screen changes color completelythen you should try and switch off one of those. Let me know if you can figureout the line that causes the mistake.One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less.> let perl_no_sync_on_sub> let perl_no_sync_on_global_varBelow you can set the maximum distance VIM should look for starting points forits attempts in syntax highlighting.> let perl_sync_dist = 100For the "<<xxx" construct (here Documents), Vim can't check for any value of"xxx". If you have a choice use "<<EOF ... EOF", then the highlighting willwork.PHP3 and PHP4 *php.vim* *php3.vim*[note: previously this was called "php3", but since it now also supports php4it has been renamed to "php"]There are the following options to the php syntax highlighting.If you like SQL syntax hightligthing inside Strings:> let php_sql_query = 1For highligthing the Baselib methods:> let php_baselib = 1Enable HTML syntax highligthing inside strings:> let php_htmlInStrings = 1For syncing minlines is being set default to 100. If youprefer another value, please make use of something like:> let php_minlines = 200Using the old colorstyle:> let php_oldStyle = 1Enable parent error highlighting:> let_parentError = 1Enable highlighting ASP-style short tags:> let php_asp_tags = 1Disable short tags:> let php_noShortTags = 1PPWIZARD (preprocessor for HTML and OS/2 INF files) *ppwiz.vim* This syntax file has the options:- ppwiz_highlight_defs : determines highlighting mode for PPWizard's definitions. Possible values are ppwiz_highlight_defs = 1 : PPWizard #define statements retain the colors of their contents (e. g. PPWizard macros and variables) ppwiz_highlight_defs = 2 : preprocessor #define and #evaluate statements are shown in a single color with the exception of line continuation symbols The default setting for ppwiz_highlight_defs is 1.- ppwiz_with_html : If the value is 1 (the default), highlight literal HTML code; if 0, treat HTML code like ordinary text.PHTML *phtml.vim*There are two options for the phtml syntax highlighting.If you like SQL syntax highligthing inside Strings, use this:> let phtml_sql_query = 1For syncing, minlines defaults to 100. If you prefer another value, you canset "phtml_minlines" to the value you desire. Example:> let phtml_minlines = 200POSTSCRIPT *postscr.vim*There are several options when it comes to highlighting PostScript.First which version of the PostScript language to highlight. There arecurrently three defined language versions, or levels. Level 1 is the originaland base version, and includes all extensions prior to the release of level 2.Level 2 is the most common version around, and includes its own set ofextensions prior to the release of level 3. Level 3 is currently the highestlevel supported. You select which level of the PostScript language you wanthighlighted by defining the postscr_level variable as follows:> let postscr_level=2If this variable is not defined it defaults to 2 (level 2) since this is
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -