mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
234 stars 15 forks source link

Expand selection is not working as expected on m files #70

Open Russiarain opened 11 months ago

Russiarain commented 11 months ago

In other language source files, when we select one line and expand selection, if that selected line is inside of a closure or if-clause, the closure or if-clause will firstly be selected, but in .m files, when we expand selection on one line, the whole file will be selected.

Is this feature a part of vs code or we can fix it in this extension?

dklilley commented 11 months ago

I'm not sure where this is configurable. It appears that VS Code has some built-in support for this - if I surround some code with { ... }, triggering Expand Selection expands the selection to be within the {}. However, Expand Selection also appears to work in Python code with it's syntax, so my guess is that there is some configurability on a per-language basis.

Russiarain commented 11 months ago

I couldn't find any settings for expand selection, maybe it's not configurable.

I remember there's some more fine-grained control over the selection behavior in other languages, for example, Dart extension added some feature related to Expand Selection in this release (#3332).