Is there a shortcut key to comment multiple lines in matlab editor

23.1k Views Asked by At

Is there a shortcut to comment multiple lines in matlab. If there isn't can I create one?

3

There are 3 best solutions below

4
On BEST ANSWER

The comment shortcut is CTRL+R on Windows and CTRL+/ on Unix systems (not sure about OS X). To comment multiple lines you'd have to highlight them using the mouse or SHIFT.

In any case this can be customized via Preferences -> Keyboard -> Shortcuts.

0
On

In Mac OS, Command + R to comment code.
Then, Shift+Command+R to un-comment.

0
On

In Octave, Ctrl+R to comment and Ctrl+Shift+R to un-comment.