Why does indent in live scripts not obey indent setting?

1 回表示 (過去 30 日間)
Henning Søgaard
Henning Søgaard 2019 年 8 月 9 日
コメント済み: Javier Orlandi 2019 年 11 月 12 日
Under Preferences/MATLAB Editor/Debugger Tab Preferences I have set Indent size to 2. This works perfectly in normal scripts. However, in live scripts the indent size is still 4 when I press Enter in connection with if constructs and loops etc.:
if a == 1
do_something
end
for k = 1:3
do_this
end
while x > 1
do_that
end
On the other hand, when I select a portion of code and apply Smart Indent (Ctrl+I), I get the desired indent of 2:
if a == 1
do_something
end
for k = 1:3
do_this
end
while x > 1
do_that
end
I would be happy if anybody could tell me how to make the live editor give indents of 2 when I press Enter.

採用された回答

Navya Seelam
Navya Seelam 2019 年 8 月 12 日
編集済み: Navya Seelam 2019 年 8 月 12 日
This issue is already brought to the notice of our developers. They will investigate the matter further."
  1 件のコメント
Javier Orlandi
Javier Orlandi 2019 年 11 月 12 日
Any update on this? I just updated to 2019b and seeing the same issue

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLive Scripts and Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by