Is there a keyboard shortcut in matlab to move cursor from the editor to command window? I want to achieve something similar to the effect of Emacs shortcut Ctrl + x, o
which moves cursor between editor windows.
Just press Ctrl+Shift+D in the editor window.
Press the TAB key to move to the Commands box. Press DOWN ARROW or UP ARROW to select the name of the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.
Comment/Uncomment Windows: Ctrl + R/Ctrl + T. Mac: ⌘ + / and ⌘ + T. Comments are an essential component of any code.
On both Mac and Windows (use Ctrl instead of CMD below for Windows), it is
The shortcuts of your system are displayed when you click on the quick access toolbar (top right), windows icon. They are not visible in the preference settings of MATLAB.
On Linux
and Windows
(tested), unless MATLAB preferences are modified, if you have the editor window docked, then according to the default settings, Ctrl+Tab
would get you from Editor to Command Window and from there to go back to Editor, you would need Ctrl+Shift+Tab
.
If you are coming from Emacs background and would like to use a similar environment for using MATLAB without the graphical user interfaces, you can choose to launch MATLAB without desktop with the command matlab -nodesktop
, when you have the matlab executable in PATH. You can open two Emacs windows, with one to edit codes that will simulate your MATLAB editor and the other one would has MATLAB command prompt, simulating the MATLAB command window.
If you would like to work with MATLAB graphical user interfaces and keep on using the Emacs shortcuts for editing in MATLAB editor, you may go to Preferences
> Keyboard Shortcuts Preferences
and under the popup menu Active settings
, set the option as Emacs Default Set
.
You may find more info on launching MATLAB without desktops here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With