Matlab livescript tab size

I would like to know how one can set the tab and indent size of livescript. I see
I would like to know whether there is an update on this issue.

3 comentarios

Rik
Rik el 24 de Nov. de 2020
You could contact support, and/or search the bug tracker. If it is missing there I would report it as a bug.
Prabhanjan Mentla
Prabhanjan Mentla el 26 de Nov. de 2020
Editada: Prabhanjan Mentla el 26 de Nov. de 2020
Hi alpedhuez, Could you provide the MATLAB version you are using ?
alpedhuez
alpedhuez el 26 de Nov. de 2020
Thnak you. 2020a

Iniciar sesión para comentar.

Respuestas (1)

Prabhanjan Mentla
Prabhanjan Mentla el 27 de Nov. de 2020
Editada: Prabhanjan Mentla el 27 de Nov. de 2020

0 votos

Hi,
Indent and tab size in MATLAB 2020a for livescript are working as expected.
You can check this by following below steps
  • Go to Preferences/MATLAB Editor/Debugger Tab Preferences
  • Set Indent size and tab size to 10 or above (to differentiate clearly).
  • Create a new live script file and add this code if a==1 and hit enter.
Vary the indent sizes to get better understanding. Likewise, you can verify for tab option also.
Hope this helps.

5 comentarios

alpedhuez
alpedhuez el 28 de Nov. de 2020
Thank you.
"add this code if a==1 and hit enter."
Would you explain what it means?
Rik
Rik el 28 de Nov. de 2020
I assume it is meant to show what the automatic indentation will be. After an if statement there should be an indentation, so if you literally type this you should see the indent.
alpedhuez
alpedhuez el 30 de Nov. de 2020
add "of a==1" to where?
Prabhanjan Mentla
Prabhanjan Mentla el 30 de Nov. de 2020
"if" is a condition after which we expect some indentation, to show how indentation works I took a sample code of "if a==1" in a new live script.
For more information, You can refer the link you have posted in the question.
Viktor Janzen
Viktor Janzen el 17 de Mayo de 2021
Editada: Viktor Janzen el 17 de Mayo de 2021
I have the problem, that the indentation does not work. (On R2021a)
For example, if I type if a == 1 and then hit enter, the cursor is going to the beginning of the next line instead of indenting the next line.
If I mark this line and hit CTR+I (for Smart-Indent), it works. But I want to auto-indent the new line WHILE typing.
In the App Designer or in normal scripts it works as known.
I checked the Preferences with my colleague but we do not find a difference although the indentation works on his computer with the same Matlab-Version.
Preferences Language
Do you have still an idea what the reason is?

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Nov. de 2020

Editada:

el 17 de Mayo de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by