Search code examples
octave

Shorcut for `Run Line(s)` in Octave / Matlab


In RStudio it is Ctrl+Enter, while in PyCharm it is Ctrl+backslash, but I can't find a similar shortcut for Octave (not so interested in Matlab). There has to be a way to run a single line of code on the editor without running the entire document. I know there is a method to run chunks of code, but this doesn't seem practical, either.


Solution

  • You need to select the code that you want to run first. The actual shortcut to then execute the selection is configurable (Edit > Preferences...) but defaults to F9.

    Or you can right click on the editor which shows you the options and shortcut:

    enter image description here