runtime(java): Fold adjacent "import" declarations
Also, distinguish (by abbreviating their names) and manage
foldable kinds of syntax items: blocks of code ("b"), plain
comments ("c"), Javadoc comments ("d"), adjacent "import"
declarations ("i"). Fold all qualifying items by default;
otherwise, do not fold items of explicitly delisted kinds.
For example,
------------------------------------------------------------
let g:java_ignore_folding = "bcdi"
------------------------------------------------------------
Resolves zzzyxwvut/java-vim#12.
closes: #18492
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
97d1255558
commit
143686b3c4
20
runtime/syntax/testdir/dumps/java_enfoldment_05.dump
Normal file
20
runtime/syntax/testdir/dumps/java_enfoldment_05.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|2+0#0000e05#a8a8a8255| | +0&#ffffff0@12|*| +0#e000e06&|{|@|i|n|h|e|r|i|t|D|o|c|}| |*+0#0000e05&|/| +0#0000000&@41
|
||||
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@11|p+0#00e0003&|u|b|l|i|c| +0#0000000&|O+0#e000002&|b|j|e|c|t| +0#0000000&|a|p@1|l|y|(|O+0#e000002&|b|j|e|c|t| +0#0000000&|o|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|o|;| |}+0#0000001#ffff4012|;+0#0000000#ffffff0| @16
|
||||
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@7|}+0#0000001#ffff4012|)+0#0000000#ffffff0|.|a|p@1|l|y|(| @55
|
||||
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@7|(|n+0#af5f00255&|e|w| +0#0000000&|F|u|n|c|t|i|o|n|<|O+0#e000002&|b|j|e|c|t|,+0#0000000&| |O+0#e000002&|b|j|e|c|t|>+0#0000000&|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0@31
|
||||
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@11|/+0#0000e05&|*@1| +0#e000e06&|{|@|i|n|h|e|r|i|t|D|o|c|}| +0#0000000&@43
|
||||
|2+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@12>*+0#0000e05&|/| +0#0000000&@57
|
||||
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@11|p+0#00e0003&|u|b|l|i|c| +0#0000000&|O+0#e000002&|b|j|e|c|t| +0#0000000&|a|p@1|l|y|(|O+0#e000002&|b|j|e|c|t| +0#0000000&|o|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|o|;| |}+0#0000001#ffff4012|;+0#0000000#ffffff0| @16
|
||||
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@7|}+0#0000001#ffff4012|)+0#0000000#ffffff0@1|;| @60
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}+0#00e0003&| +0#0000000&@67
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
|
||||
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#0000000&@65
|
||||
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@52
|
||||
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*|/| +0#0000000&@65
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0|}+0#0000001#ffff4012| +0#0000000#ffffff0@52
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56
|
||||
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|{+0#0000001#ffff4012| +0#0000000#ffffff0@67
|
||||
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|}+0#0000001#ffff4012| +0#0000000#ffffff0@67
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48
|
||||
@57|9|1|,|5|-|1|4| @6|6|7|%|
|
||||
Reference in New Issue
Block a user