How can I word-wrap long lines of scripts and functions in the MATLAB R2011b Editor?
I don't mean using Ctrl+J to wrap comments, but show a long line over several lines, each (except the last) the width of the editor frame, as in most text editors, so I don't need to scroll horizontally; the effect is purely visual and it remains as a single line in the file.
I could not find a setting in any menu, toolbar or the preferences dialog.
Though I could split the line into multiple lines using "...", I don't want to do this. I want to keep it as one line in the file, just show it wrapped, as in Format > Word Wrap in Windows Notepad.
The way to do this is by using the three dots ...
For example:
Hc_frame_1 = uicontrol(gcf, ...
'Style', 'frame',...
'Units', 'pixels',...
'Position', [25 250 200 230]);
These three dots tell MATLAB to continue the command on the next line. Without them MATLAB will think that the command is incomplete.
There is no way to wrap general text in the editor.
It can be set to do so but just for comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With