MATLAB functions are usually denominated by the function keyword and end like so:
function result = fone(arg1,arg2,arg3)
% code here
result = return_value;
end
However, the end key is technically optional, so the above could be written:
function result = ftwo(arg1,arg2,arg3)
% code here
result = return_value;
function another_result = fthree(arg1,arg2,arg3)
...
The first example fone() folds fine, but ftwo(), for lack of a defined termination (aside from the beginning of the next function) does not fold.
Usually it's simple to write functions using the end keyword and avoid all this, but in sizable files, especially large, computer-generated ones like those used by GUIDE, adding the end key and cleaning up indentation can be a hassle.
Is there a way you could make functions like this fold properly? I'm on Atom 1.9.7.
MATLAB functions are usually denominated by the
function
keyword andend
like so:However, the
end
key is technically optional, so the above could be written:The first example
fone()
folds fine, butftwo()
, for lack of a defined termination (aside from the beginning of the next function) does not fold.Usually it's simple to write functions using the
end
keyword and avoid all this, but in sizable files, especially large, computer-generated ones like those used by GUIDE, adding the end key and cleaning up indentation can be a hassle.Is there a way you could make functions like this fold properly? I'm on Atom 1.9.7.
Best,
Andrew Lee