mirror of
https://github.com/vim/vim
synced 2025-05-02 22:37:47 +02:00
Also: - Restore the capability to mark as an error braces nested in parens with g:javaInParen. - Try not to fold top-level-type bodies. (Defining multiple package-private top level types in a single source file is not recommended as it can impose order among compilation units; so it is assumed that only one such top level type is usually defined.) - Compose ‘method header’ highlighting and block braces folding. - Do not highlight block braces whenever ‘method header’ highlighting is requested. This bundling of ‘method headers’ and block braces for highlighting can be traced back to Vim v5.0; however, no comment or documentation entry conveys any justification. For example, it is hard to discover the connection between block braces for "while", "if", etc., statements and method body block braces. The former behaviour can be attained in, e.g. ~/.vim/after/syntax/java.vim: ------------------------------------------------------------ if exists("g:java_highlight_functions") syn clear javaBlock javaInParen syn match javaBlockOther "[{}]" syn region javaBlock transparent matchgroup=javaBlockStart \ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold hi def link javaBlockStart javaFuncDef hi def link javaBlockOther javaBlockStart if exists("g:java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" endif endif ------------------------------------------------------------ Note: Read ‘a method header omitting a _throws_ clause’ for every ‘method header’ appellation used above. Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
20 lines
1 KiB
Text
20 lines
1 KiB
Text
| +0&#ffffff0@74
|
|
@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|n+0#e000002&|u|l@1|)+0#0000000&| |{| @46
|
|
@12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r| |w+0#af5f00255&|h|e|n| +0#0000000&|!|"+0#e000002&|<|e|m|p|t|y|>|"|.+0#0000000&|e|q|u|a|l|s|(| @23
|
|
@28|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|s|t|r|)| |{| @32
|
|
@16|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| |w+0#af5f00255&|h|e|n| +0#0000000&@37
|
|
@20>P|r|e|d|i|c|a|t|e|.|<|S|t|r|i|n|g|>|n|o|t|(|t+0#00e0e07&|e|x|t| |-|>| +0#0000000&@25
|
|
@28|!|t|e|x|t|.|i|s|E|m|p|t|y|(|)@1| @30
|
|
@24|.|t|e|s|t|(|s|t|r|_|)| @39
|
|
@28|-|>| |"+0#e000002&|<|e|m|p|t|y|>|"|;+0#0000000&| @33
|
|
@16|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| @3|-|>| |s|t|r|_|;| @30
|
|
@16|}|)| @5|-|>| |s|t|r|;| @43
|
|
@12|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|,+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@1|-|>| |"+0#e000002&|O|t|h|e|r|"|;+0#0000000&| @31
|
|
@8|}|)|;| @63
|
|
@4|}| @69
|
|
|}| @73
|
|
|~+0#4040ff13&| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
| +0#0000000&@56|1|4|5|,|6|-|2|1| @5|B|o|t|
|