Skip to content

Commit d9ab031

Browse files
author
Caspar Gruijthuijsen
committed
updated readme for matlab keyboard shortcut commands
1 parent 0862272 commit d9ab031

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ __Table of Contents__:
2020
- [Matlab commands](#matlab-commands)
2121
+ [AutoMatlab Command Panel](#automatlab-command-panel)
2222
+ [Predefined commands](#predefined-commands)
23-
+ [Custom commands](#custom-commands)
23+
+ [Custom commands: Matlab Command Window](#custom-commands-matlab-command-window)
24+
+ [Custom commands: Matlab keyboard shortcuts](#custom-commands-matlab-keyboard-shortcuts)
2425
- [Function documentation generation](#function-documentation-generation)
2526
+ [Predefined documentation template snippets](#predefined-documentation-template-snippets)
2627
+ [Custom documentation template snippets](#custom-documentation-template-snippets)
2728
+ [Project-specific documentation format](#project-specific-documentation-format)
28-
- [Roadmap](#roadmap)
2929

3030
Getting started
3131
---------------
@@ -104,32 +104,32 @@ AutoMatlab provides autocompletion information for local Matlab functions inside
104104
Matlab commands
105105
---------------
106106

107-
If [AutoHotkey](https://www.autohotkey.com/) is installed, AutoMatlab can send commands to Matlab, to be run in Matlab's Command Window.
107+
If [AutoHotkey](https://www.autohotkey.com/) is installed, AutoMatlab can send commands to Matlab, to be run in the Matlab Command Window.
108108

109109
### AutoMatlab Command Panel
110110

111111
![Command panel](fig/command_panel.png)
112112

113113
The AutoMatlab Command Panel can be accessed through the Sublime Command Palette or via <kbd>Alt + m</kbd>. It shows command suggestions from the recent Matlab history. If no history is shown, make sure `matlab_history_path` is correctly set in the AutoMatlab settings.
114114

115-
Through the AutoMatlab Command Panel, commands can be transferred to Matlab:
115+
Through the AutoMatlab Command Panel, commands can be sent to Matlab:
116116

117117
- <kbd>Enter</kbd> Run the selected history entry in Matlab.
118118
- <kbd>&rarr;</kbd> Insert the selected history entry into the AutoMatlab Command Panel.
119119
- <kbd>Tab</kbd> Run the input from the AutoMatlab Command Panel in Matlab.
120120

121121
### Predefined commands
122122

123-
A number of useful Matlab commands have been predefined. They can be run through the Sublime Command Palette or via keyboard shortcuts. Some examples:
123+
A number of useful commands have been predefined. They can be run through the Sublime Command Palette or via keyboard shortcuts. Some examples:
124124

125125
- <kbd>Ctrl + b</kbd> Run the current file in Matlab.
126126
- <kbd>Ctrl + Shift + b</kbd> Change the current folder and run the current file in Matlab.
127127
- <kbd>Alt + .</kbd> Set a Matlab breakpoint at the current line.
128128
- <kbd>Alt + ,</kbd> Clear the Matlab breakpoint from the current line.
129129

130-
### Custom commands
130+
### Custom commands: Matlab Command Window
131131

132-
It is possible to define custom Matlab commands, which can be assigned to keyboard shortcuts or added to the Sublime Command Palette. For custom Matlab commands, use the AutoMatlab command `run_matlab_command` as follows:
132+
It is possible to define custom AutoHotkey commands that execute text commands inside the Matlab Command Window. These AutoMatlab commands can be added to the Sublime Key Bindings or to the Sublime Command Palette. To create custom commands for the Matlab Command Window, use the AutoMatlab command `run_matlab_command` as follows:
133133

134134
```json
135135
{
@@ -148,6 +148,20 @@ The AutoMatlab command `run_matlab_command` will expand the default Sublime Text
148148
- `$package_parent`: The path of the parent directory for the currently opened Matlab package.
149149
Example: `C:\Users\Foo\myproject\+mypack\myfun.m` &rarr; `C:\Users\Foo\myproject`.
150150

151+
### Custom commands: Matlab keyboard shortcuts
152+
153+
It is possible to define custom AutoHotkey commands that execute Matlab keyboard shortcuts inside Matlab. These AutoMatlab commands can be added to the Sublime Key Bindings or to the Sublime Command Palette. To create custom commands that run keyboard shortcuts in Matlab, use the AutoMatlab command `run_matlab_command` as follows:
154+
155+
```json
156+
{
157+
"caption": "AutoMatlab: Stop execution",
158+
"command": "run_matlab_command",
159+
"args": {"command": "^c", "type": "key"}
160+
}
161+
```
162+
163+
These commands use the syntax of the `SendInput` function of AutoHotkey. For more details on this syntax, see the sections _Parameters_ and _Key names_ in the AutoHotkey [documentation](https://www.autohotkey.com/docs/commands/Send.htm).
164+
151165
Function documentation generation
152166
---------------------------------
153167

0 commit comments

Comments
 (0)