Is it possible to have the line number of the editor window highlighted when I click somewhere in the code?

조회 수: 3 (최근 30일)
I was wondering if it's possible (whether this can be achieved with a built-in MATLAB function or custom user functions) to highlight the line number in the left-hand side of the editor window whenever you click somewhere in the code.
Here's an example of the functionality I'm looking for in Visual Studio Code:
Notice how in line 26, the line number on the left bar is highlighted when you click somewhere in the code pertaining to that line. Is there a way at all to achieve this on MATLAB?
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 5월 24일
There is an option to highlight the current line, but I don't think there is an inbuilt way to highlight the line number.

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

답변 (1개)

Image Analyst
Image Analyst 2023년 5월 24일
See the Preferences on the Home Tab of the tool ribbon. Look at the first checkbox:
Check the box and choose your color. The text in the editor window will be that color on the line where the cursor is, but the line number in the left margin is not colored.
  댓글 수: 2
Dandro18048
Dandro18048 2023년 5월 28일
Thank you for your answer. I tried this and while it's useful to have this option available to highlight the line of code, there is still no way to highlight the line number itself (as you already mentioned in your answer).

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

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by