Can I see code changes in the editor window?

If I have some code which is under source control is it possible to see lines which are modified or new in the editor window?
In many IDEs lines which are added/modified/deleted appear with a coloured bar next to them in the margin, perhaps green/blue/red respectively. This seems to be missing from the Matlab editor. Am I missing something?

답변 (2개)

Aquatris
Aquatris 2024년 3월 28일

0 개 추천

You can right click the .m file on Matlab's 'Current Folder' view. There under the 'Source Control' you have options to 'Compare to Ancestor' or 'Compare to Revision', which does exactly what you want, just not in the editor window.

댓글 수: 4

Thank you for your answer. I was hoping the change indicator could be shown in the editor. I found the method via the Current Folder menu quite slow and certainly clunky. Seeing the differences (recent modifications) in the editor window is most convenient. For starters you can quickly skip to the newest portions of code you are working on.
Aquatris
Aquatris 2024년 4월 1일
Agreed, thats why I generaly use VS code to check those changes. It has much better version control capabilities.
I see VScode does code execution now too. Do you find you execute/debug things in Matlab environment and write/source control things in the VScode environment then?
Aquatris
Aquatris 2024년 4월 2일
Generally yes. I debug/execute my code in Matlab environment but for version control stuff, commiting things, pull/push, comparison to revisions etc., I generally use VScode.

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

Strider
Strider 2024년 3월 28일

0 개 추천

댓글 수: 1

Thank you for your answer but I am really looking for an in-editor view of code changes.

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

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2024년 3월 28일

댓글:

2024년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by