Mercurial > vim
comparison runtime/doc/syntax.txt @ 1224:edc1c9d6dab9
updated for version 7.1b
author | vimboss |
---|---|
date | Thu, 10 May 2007 19:06:20 +0000 |
parents | 96cd8222a819 |
children | d787f6c4c481 |
comparison
equal
deleted
inserted
replaced
1223:dfd2f4a60a64 | 1224:edc1c9d6dab9 |
---|---|
1 *syntax.txt* For Vim version 7.1a. Last change: 2007 May 03 | 1 *syntax.txt* For Vim version 7.1b. Last change: 2007 May 07 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
852 | 852 |
853 Doxygen generates code documentation using a special documentation format | 853 Doxygen generates code documentation using a special documentation format |
854 (similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp | 854 (similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp |
855 and idl files, and should also work with java. | 855 and idl files, and should also work with java. |
856 | 856 |
857 There are a few of ways to turn on doxygen formatting. It can be done explicity | 857 There are a few of ways to turn on doxygen formatting. It can be done |
858 or in a modeline by appending '.doxygen' to the syntax of the file. Example: > | 858 explicitly or in a modeline by appending '.doxygen' to the syntax of the file. |
859 Example: > | |
859 :set syntax=c.doxygen | 860 :set syntax=c.doxygen |
860 or > | 861 or > |
861 // vim:syntax=c.doxygen | 862 // vim:syntax=c.doxygen |
862 | 863 |
863 It can also be done automaticly for c, cpp and idl files by setting the global | 864 It can also be done automatically for c, cpp and idl files by setting the |
864 or buffer-local variable load_doxygen_syntax. This is done by adding the | 865 global or buffer-local variable load_doxygen_syntax. This is done by adding |
865 following to your .vimrc. > | 866 the following to your .vimrc. > |
866 :let g:load_doxygen_syntax=1 | 867 :let g:load_doxygen_syntax=1 |
867 | 868 |
868 There are a couple of variables that have an affect on syntax highlighting, and | 869 There are a couple of variables that have an affect on syntax highlighting, and |
869 are to do with non-standard highlighting options. | 870 are to do with non-standard highlighting options. |
870 | 871 |
1289 Some HTML tags are used to change the rendering of text. The following tags | 1290 Some HTML tags are used to change the rendering of text. The following tags |
1290 are recognized by the html.vim syntax coloring file and change the way normal | 1291 are recognized by the html.vim syntax coloring file and change the way normal |
1291 text is shown: <B> <I> <U> <EM> <STRONG> (<EM> is used as an alias for <I>, | 1292 text is shown: <B> <I> <U> <EM> <STRONG> (<EM> is used as an alias for <I>, |
1292 while <STRONG> as an alias for <B>), <H1> - <H6>, <HEAD>, <TITLE> and <A>, but | 1293 while <STRONG> as an alias for <B>), <H1> - <H6>, <HEAD>, <TITLE> and <A>, but |
1293 only if used as a link (that is, it must include a href as in | 1294 only if used as a link (that is, it must include a href as in |
1294 <A href="somfile.html">). | 1295 <A href="somefile.html">). |
1295 | 1296 |
1296 If you want to change how such text is rendered, you must redefine the | 1297 If you want to change how such text is rendered, you must redefine the |
1297 following syntax groups: | 1298 following syntax groups: |
1298 | 1299 |
1299 - htmlBold | 1300 - htmlBold |
1406 IDL (Interface Definition Language) files are used to define RPC calls. In | 1407 IDL (Interface Definition Language) files are used to define RPC calls. In |
1407 Microsoft land, this is also used for defining COM interfaces and calls. | 1408 Microsoft land, this is also used for defining COM interfaces and calls. |
1408 | 1409 |
1409 IDL's structure is simple enough to permit a full grammar based approach to | 1410 IDL's structure is simple enough to permit a full grammar based approach to |
1410 rather than using a few heuristics. The result is large and somewhat | 1411 rather than using a few heuristics. The result is large and somewhat |
1411 repetative but seems to work. | 1412 repetitive but seems to work. |
1412 | 1413 |
1413 There are some Microsoft extensions to idl files that are here. Some of them | 1414 There are some Microsoft extensions to idl files that are here. Some of them |
1414 are disabled by defining idl_no_ms_extensions. | 1415 are disabled by defining idl_no_ms_extensions. |
1415 | 1416 |
1416 The more complex of the extensions are disabled by defining idl_no_extensions. | 1417 The more complex of the extensions are disabled by defining idl_no_extensions. |
2246 of the block it closes. While useful, this feature can be expensive; if you | 2247 of the block it closes. While useful, this feature can be expensive; if you |
2247 experience slow redrawing (or you are on a terminal with poor color support) | 2248 experience slow redrawing (or you are on a terminal with poor color support) |
2248 you may want to turn it off by defining the "ruby_no_expensive" variable: > | 2249 you may want to turn it off by defining the "ruby_no_expensive" variable: > |
2249 | 2250 |
2250 :let ruby_no_expensive = 1 | 2251 :let ruby_no_expensive = 1 |
2251 | 2252 < |
2252 In this case the same color will be used for all control keywords. | 2253 In this case the same color will be used for all control keywords. |
2253 | 2254 |
2254 If you do want this feature enabled, but notice highlighting errors while | 2255 If you do want this feature enabled, but notice highlighting errors while |
2255 scrolling backwards, which are fixed when redrawing with CTRL-L, try setting | 2256 scrolling backwards, which are fixed when redrawing with CTRL-L, try setting |
2256 the "ruby_minlines" variable to a value larger than 50: > | 2257 the "ruby_minlines" variable to a value larger than 50: > |
2257 | 2258 |
2258 :let ruby_minlines = 100 | 2259 :let ruby_minlines = 100 |
2259 | 2260 < |
2260 Ideally, this value should be a number of lines large enough to embrace your | 2261 Ideally, this value should be a number of lines large enough to embrace your |
2261 largest class or module. | 2262 largest class or module. |
2262 | 2263 |
2263 Highlighting of special identifiers can be disabled by defining | 2264 Highlighting of special identifiers can be disabled by removing the |
2264 "ruby_no_identifiers": > | 2265 rubyIdentifier highlighting: > |
2265 | 2266 |
2266 :let ruby_no_identifiers = 1 | 2267 :hi link rubyIdentifier NONE |
2267 | 2268 < |
2268 This will prevent highlighting of special identifiers like "ConstantName", | 2269 This will prevent highlighting of special identifiers like "ConstantName", |
2269 "$global_var", "@@class_var", "@instance_var", "| block_param |", and | 2270 "$global_var", "@@class_var", "@instance_var", "| block_param |", and |
2270 ":symbol". | 2271 ":symbol". |
2271 | 2272 |
2272 Significant methods of Kernel, Module and Object are highlighted by default. | 2273 Significant methods of Kernel, Module and Object are highlighted by default. |
2273 This can be disabled by defining "ruby_no_special_methods": > | 2274 This can be disabled by defining "ruby_no_special_methods": > |
2274 | 2275 |
2275 :let ruby_no_special_methods = 1 | 2276 :let ruby_no_special_methods = 1 |
2276 | 2277 < |
2277 This will prevent highlighting of important methods such as "require", "attr", | 2278 This will prevent highlighting of important methods such as "require", "attr", |
2278 "private", "raise" and "proc". | 2279 "private", "raise" and "proc". |
2279 | 2280 |
2281 Ruby operators can be highlighted. This is enabled by defining | |
2282 "ruby_operators": > | |
2283 | |
2284 :let ruby_operators = 1 | |
2285 < | |
2280 Whitespace errors can be highlighted by defining "ruby_space_errors": > | 2286 Whitespace errors can be highlighted by defining "ruby_space_errors": > |
2281 | 2287 |
2282 :let ruby_space_errors = 1 | 2288 :let ruby_space_errors = 1 |
2283 | 2289 < |
2284 This will highlight trailing whitespace and tabs preceded by a space character | 2290 This will highlight trailing whitespace and tabs preceded by a space character |
2285 as errors. This can be refined by defining "ruby_no_trail_space_error" and | 2291 as errors. This can be refined by defining "ruby_no_trail_space_error" and |
2286 "ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after | 2292 "ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after |
2287 spaces respectively. | 2293 spaces respectively. |
2288 | 2294 |
2289 Folding can be enabled by defining "ruby_fold": > | 2295 Folding can be enabled by defining "ruby_fold": > |
2290 | 2296 |
2291 :let ruby_fold = 1 | 2297 :let ruby_fold = 1 |
2292 | 2298 < |
2293 This will set the 'foldmethod' option to "syntax" and allow folding of | 2299 This will set the 'foldmethod' option to "syntax" and allow folding of |
2294 classes, modules, methods, code blocks, heredocs and comments. | 2300 classes, modules, methods, code blocks, heredocs and comments. |
2295 | 2301 |
2302 Folding of multiline comments can be disabled by defining | |
2303 "ruby_no_comment_fold": > | |
2304 | |
2305 :let ruby_no_comment_fold = 1 | |
2306 < | |
2296 | 2307 |
2297 SCHEME *scheme.vim* *ft-scheme-syntax* | 2308 SCHEME *scheme.vim* *ft-scheme-syntax* |
2298 | 2309 |
2299 By default only R5RS keywords are highlighted and properly indented. | 2310 By default only R5RS keywords are highlighted and properly indented. |
2300 | 2311 |