As recommended by Oracle's Java Code Conventions, I try to avoid lines longer than 80 characters. For this it's of course often necessary to break lines, and the document contains some general principles for this purpose.
Here are four examples given by the style guide.
function(longExpression1, longExpression2, longExpression3,
longExpression4, longExpression5);
var = function1(longExpression1,
function2(longExpression2,
longExpression3));
longName1 = longName2 * (longName3 + longName4 - longName5)
+ 4 * longname6;
if ((condition1 && condition2)
|| (condition3 && condition4)
||!(condition5 && condition6)) {
doSomethingAboutIt();
}
The indentation file often recommended doesn't seem to implement these guidelines. Is there any somewhat easy way to set up autoindent in accordance with these recommendations? In my vimrc I have set cindent
and set cinoptions=(0
, which cover the first two cases. Unfortunately, I couldn't find any options to realize autoindent for the other scenarios.
Any suggestions would be greatly appreciated! `