Is this a Matlab bug? The use of Ctrl + A to select all

I use Ctrl + A and then right click "smart indent" a lot.
Unfortunately, every time I do that, my cursor is moved to the very end of my script. This is very annoying, because I have tens of thousands of lines. Is there an easy way to make sure that when I apply Ctrl + A, my cursor will stay at my current location?

9 Comments

Check your shortcuts before posting the question
You do not have that problem?
Did you try Ctrl+A in a really long code? I just tried it again. Same problem.
You can add bookmark to return to your line. Crtl+F2 and just F2
Oh my goodness I did not know about the bookmark functionality. Please put that as an answer so I can give you a vote!
Hi All,
I'm just humbly reporting a minor issue and hope Mathworks will improve on that. How about we stop the sarcasm and let people who are willing to help me do so?
Come on, do I have to rely on a bookmark in order to come to the same line, only because I used Ctrl + A to do a smart in dent? Shouldn't Matlab, by default, let us stay at the same line when using Ctrl + A to do a smart indent?
BTW, Ctrl + F2 or F2 controls my PC sound volume on my PC.
I wasn't being sarcastic, I genuinely think the bookmark functionality is cool, and could have made use of it countless times in the past. As for the Ctrl+A issue, ... don't know what to say. But you can report bugs here:
You may also find this article interesting:
The best way to complain about this behaviour is indeed to raise a service request with Mathworks as per Daniel M's comment. I wouldn't hold my breath waiting for it to change, however the editor is constantly being improved so it may come as a result of other improvements.
In my opinion, Matlab's editor is indeed lacking compared to other code editors, including free ones.
As for this particular behaviour, I don't think there is a workaround at present, other than the bookmarking method mentioned, which is indeed awkward.
Thanks!
I have created a bug report for this. Let's keep our fingers crossed.

Sign in to comment.

Answers (1)

You can add bookmark to return to your line. Crtl+F2 and just F2
Please accept my answer give me a vote
1234.png

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Release

R2019b

Asked:

on 23 Oct 2019

Commented:

on 23 Oct 2019

Community Treasure Hunt

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

Start Hunting!