Weird question about the editor...

조회 수: 5 (최근 30일)
Spaceman
Spaceman 2024년 3월 9일
댓글: Spaceman 2024년 4월 8일
So this might be insanely daft of me to ask...
But most of my code writing takes place in the editor. When writing code/copy pasting stuff into a code comment I can't help but notice that thin line that runs veritcally down in the editor, over about 1/3 of the total lenth of the screen to the right of the code. What is this line? Why does it sometimes word-wrap my comments when it touches the line, and sometimes doesnt? Just a curious cat meowing into the midnight under the moonlight.
  댓글 수: 8
DGM
DGM 2024년 3월 21일
To be fair, I've changed my formatting style a number of times over the years, but I never fail to think that I've got it nailed down tight. It's almost like I don't know what I'm doing. :)
Spaceman
Spaceman 2024년 4월 8일
What do you mostly use MATLAB for?

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2024년 3월 9일
The line you are talking about is referred to as the "right-hand text limit". You can adjust some properties for it under MATLAB -> Settings -> Editor/Debugger -> Display. As I recall that line is just a visual reference, with no impact on wrapping.
There is also "Comment Formatting" under MATLAB -> Settings -> Editor/Debugger -> Language. That does affect wrapping. (It is a bit smart in that it won't split words in half, etc.)
I believe these are both set to 75 initially, but you can set them independently.
  댓글 수: 3
the cyclist
the cyclist 2024년 3월 10일
I have the "Display" value at 125, and the "Language" setting at 75. I can't remember if those are just the default, or I changed them.
Spaceman
Spaceman 2024년 3월 14일
I believe the default for the line is 75. I set mine to 100 columns as it seems to be more "out of my way". I only notice the issue of it not wrapping properly when I copy and paste something into my functions of scripts; There is probably a setting to fix that, of which I will never know.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by