Skip to content

Commit cae1599

Browse files
author
Caspar Gruijthuijsen
committed
updated readme about open/end statement pairing
1 parent 8c7f36a commit cae1599

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ __Table of Contents__:
2626
+ [Predefined documentation template snippets](#predefined-documentation-template-snippets)
2727
+ [Custom documentation template snippets](#custom-documentation-template-snippets)
2828
+ [Project-specific documentation format](#project-specific-documentation-format)
29+
- [Extras](#extras)
30+
+ [Open/end statement pairing](#openend-statement-pairing)
2931

3032
Getting started
3133
---------------
@@ -228,3 +230,36 @@ The following settings can be added to the `.sublime-project` file to adapt the
228230
}
229231
}
230232
```
233+
234+
Extras
235+
------
236+
237+
### Open/end statement pairing
238+
239+
AutoMatlab recognizes paired open statements (e.g., `if`, `for`, `function`) and end statements. When the cursor is in an open or end statement, the following popup about the paired statement
240+
241+
![Pair open end popup](fig/pair_open_end_popup.png)
242+
243+
can be triggered with command:
244+
245+
```json
246+
{
247+
"caption": "AutoMatlab: Pair open+end statement",
248+
"command": "pair_matlab_statements",
249+
"args": {"action": "popup"},
250+
}
251+
```
252+
253+
There are also commands to directly jump between open/end statements or to select all enclosed code:
254+
```json
255+
{
256+
"caption": "AutoMatlab: Jump open+end statement",
257+
"command": "pair_matlab_statements",
258+
"args": {"action": "jump"},
259+
},
260+
{
261+
"caption": "AutoMatlab: Select open+end statement",
262+
"command": "pair_matlab_statements",
263+
"args": {"action": "select"},
264+
}
265+
```

fig/pair_open_end_popup.png

18.2 KB
Loading

messages/1.1.0.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Changes in 1.0.2
1919
}
2020

2121

22-
- New feature: AutoMatlab can now recognized matched opening
23-
statements (e.g., if, for, function) and ending statements.
22+
- New feature: AutoMatlab can now recognized paired open
23+
statements (e.g., if, for, function) and end statements.
2424
Play around with the following commands:
2525

2626
{

0 commit comments

Comments
 (0)