multiple line edit is not allowed on MATLAB file editor window?

36 ビュー (過去 30 日間)
Taekyu Shin
Taekyu Shin 2015 年 10 月 23 日
回答済み: Jared MacDonald 2022 年 8 月 25 日
Hi,
Emacs, Sublime text and Visual studio, etc. They all have multiple line edit.
If you do not know what I mean, please see this video at : https://www.youtube.com/watch?feature=player_embedded&v=qp2WuJ2rEE4
Can we do that?
  9 件のコメント
Walter Roberson
Walter Roberson 2022 年 2 月 17 日
In new-enough MATLAB releases, the traditional editor has been replaced by the live editor, so rectangular editing is now supported.
Prakash Singh Badal
Prakash Singh Badal 2022 年 6 月 4 日
編集済み: Prakash Singh Badal 2022 年 6 月 4 日
In case someone stumbled on this thread, following is the exact answer on how to do it. Note the use of mouse with alt and not keyboard (unlike usual editors).

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

回答 (4 件)

Dario Mangoni
Dario Mangoni 2016 年 9 月 26 日
I would upvote 1billion times this question. Matlab is a so powerful tool that is really becomed lame for its lacking-features Editor.
Together with multiediting, it lacks also of the "duplicate line" feature.
@dpb: Follows a textual description: "Duplicate line" feature allow to duplicate the line you are on, usually pressing Ctrl+D. e.g.
disp('I like textual descriptions')
... pressing Ctrl+D while the cursor is on that line gives
disp('I like textual descriptions')
disp('I like textual descriptions')
Please, don't ask us why this feature is "really useful".
  1 件のコメント
dpb
dpb 2016 年 9 月 27 日
In Brief, numeric keypad '+' copies the current line to buffer and then numeric keypad 'Insert' pastes that buffer (line). Unfortunately for me, the Brief emulation in VS is incomplete and some keystrokes aren't allowed to be remapped at all so it's pretty-much useless.
My question before wasn't anything about whether whatever was/wasn't useful; simply didn't recognize the desired functionality by the description. And, it's certainly much quicker to simply read a simple description than have to go watch a video...and if it takes a video to explain it, I don't care enough and undoubtedly don't use it so don't have anything to add! :)

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


Stefan de Groot
Stefan de Groot 2019 年 4 月 23 日
Dear Mathworks,
Any update on this feature request please!
Thank you!

Ken Atwell
Ken Atwell 2015 年 10 月 24 日
The MATLAB Editor does not have this, I think. Do you have an example MATLAB source file you can share with us where this kind of thing would be really useful to have?
  4 件のコメント
Jaco-Louis Venter
Jaco-Louis Venter 2021 年 5 月 19 日
The most common use I can think of for this feature would be to suppress multiple lines of code with a ;. During development, I leave many lines unsuppressed to make sure the output is what I expect. If I then tidy up my code, I have to spend quite some time inserting ; everywhere. With multi-select this would be a piece of cake.
Damir Rakhimov
Damir Rakhimov 2022 年 2 月 17 日
編集済み: Damir Rakhimov 2022 年 2 月 17 日
I have one - when I need to change the same parameter in multiple scenarios simultaneously on different lines. Please check the attached file. I can use search and replace but the feature of editing multiple lines simultaneously is more handy - I use Sublime for this purpose at the moment. Also I would like to note that the attached example file is the small one, sometimes such files can contain up to fifty or more lines of configurations.
It would be great if such feature will appear in Matlab.

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


Jared MacDonald
Jared MacDonald 2022 年 8 月 25 日
Please note that the MATLAB Editor has this feature as of R2021b. You can hold "Alt" or "Option" while clicking to make a multi-cursor block selection. Please see the "Edit and Format Code" section of the documentation for more information.

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by