How to write in multiple lines simultaneously in Matlab Editor ?

280 views (last 30 days)
I have seen the new funcionalities in version 2021b and it appears that you can put the cursor in multiples lines for writing code.

Answers (1)

Michael Zauner
Michael Zauner on 21 Oct 2021
This feature works only in adjacent lines.
Hold down the 'Alt' Key and drag over multiple lines with the mouse.
You should then see multiple highlighted characters.
This feature only works on Matlab 2021b!
  2 Comments
Christopher Bitikofer
Christopher Bitikofer on 25 Sep 2022 at 18:16
The multiline editing in matlab is really nice, but is there any way we can get the arrow keys to work with it? What i mean is, When the alt key is held and we press the up and down arrows, additional lines should be added to our selection. This would same me some significant time swapping from keyboard to mouse. Also, on a laptop the arrow keys are far more reliable for accuarte input that trackpads.
If there is an existing way to do this i'd love to know! Thanks for considering!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by