我认为你能做的最好的事情需要你做三个步骤.
当您最初添加一些文本时,它看起来像这样:
% a) this is a test comment. this is a test comment. ADDED TEXT this is a test comment
% this is a test comment. this is a test comment. this is a test
% comment! this is a test comment!
首先,选择文本(或通过CTRL a选择整个文件),然后使用CTRL J发出“wrap comments”命令.现在你的文字看起来像这样:
% a) this is a test comment. this is a test comment. ADDED TEXT this is a
% test comment
% this is a test comment. this is a test comment. this is a test
% comment! this is a test comment!
其次,您必须手动缩进第一行,因此文本如下所示:
% a) this is a test comment. this is a test comment. ADDED TEXT this is a
% test comment
% this is a test comment. this is a test comment. this is a test
% comment! this is a test comment!
第三,选择文本并再次使用CTRL J.您的文字将如下所示:
% a) this is a test comment. this is a test comment. ADDED TEXT this is a
% test comment this is a test comment. this is a test comment. this is a
% test comment! this is a test comment!
它并不完美,但它在Matlab编辑器中就像我所知道的一样好.