how to make comments *not* wrap?

how to make comments not wrap?
or alternatively, how can i move this annoying vertical gray line that insists on wrapping my comments to the next row? My code can have >80 characters/per line, must i always have this line through the middle of my code?

 采纳的回答

Francesco Marini
Francesco Marini 2017-11-30

25 个投票

Go to Preferences -> Editor -> Language
Under 'Comment formatting', uncheck 'Wrap comments automatically while typing'

8 个评论

This was the answer that actually helped me find that checkbox! Thanks.
Thank you very much! The automatic comment wrapping has been annoying me, so I finally Googled and found this solution.
Thank you
In newer version of MATLAB the sub-section is:
Preferences > MATLAB > Editor/Debugger > Language > Comment formating
The vertical line is still there at column 75.
Under Editor/Debugger preferences, in the Display section, unselect "Right-hand text limit".
See this documentation page for more information about the various Editor/Debugger preferences.

请先登录,再进行评论。

更多回答(2 个)

Johannes Kalliauer
Johannes Kalliauer 2021-6-15

5 个投票

The answer (from 2015) of @Jon now with screenshot:
Preferences -> MATLAB -> Editor/Debugger -> Language -> Comment formating
Uncheck "Wrap comments automatically while typing".
Jon
Jon 2015-9-25

2 个投票

Did you even look through the Editor options in Preferences? There is a button you can uncheck to turn it off.

2 个评论

actually i looked through all 20+ tabs of preferences but missed it. thanks!
See below for actual instructions

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Scripts 的更多信息

产品

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by