New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate current line (and move to next line) or selection #128
Comments
I think I would be the best to search for the next 'uncommented line' to check if the line starts (excluding whitespaces) with the % character. I propose this because I often use block comment (%{ ... %}) to add some usage examples to the functions help section. For the evaluation of these examples I am in commented lines but they doesn't begin with a % character. |
@cowlumbus
Isn't this the behavior of F9?
This is definitely an improvement. @MartinLechner-TD |
F9 only runs if a chunk of code (either a variable, a section of a line, a line, or multiple lines) is selected. I like your function of run the current line without selecting it. Now I want to know if we can combine these two functions into one hotkey like what RStudio does. Thanks. |
oh... haven't thought of that. should be possible. |
|
Thank you for the beautiful MEP tool.
I wonder if we can have the following two features:
Evaluate current line or section.
If no selection, evaluate the current line (also see the Feature 2 below). If a line or part of a line (e.g., a variable, etc) is selected, only evaluate the selection.
Evaluate current line and move to the next line
Currently, the SHIFT+F9 will select the current line and execute it. After executing, the line remains selected.
Is there a way to set it to move the mouse cursor to the next uncommented line? This is a really convenient feature in RStudio.
The following post has a solution to this. However, it does not provide a way to customize the shortcut key. I replaced the shortcut key (SHIFT+F9) to F4. One key is easier to handle than two keys.
https://www.mathworks.com/matlabcentral/answers/132119-keyboard-shortcut-to-evaluate-current-line
Thanks.
The text was updated successfully, but these errors were encountered: