Skip to content

Commit 8d2df8c

Browse files
committed
docs: update example
1 parent 702be6a commit 8d2df8c

1 file changed

Lines changed: 37 additions & 27 deletions

File tree

README.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
[![Build](https://img.shields.io/github/actions/workflow/status/idleberg/vscode-applescript/default.yml?style=for-the-badge)](https://github.com/idleberg/vscode-applescript/actions)
77

88
> [!IMPORTANT]
9-
> JXA support is now deprecated and has been moved to a separate extension. Please refer to the [deprecation notice](https://github.com/idleberg/vscode-jxa/discussions/2) for details.
9+
> JXA support is now deprecated and has been moved to a separate extension.
10+
> Please refer to the
11+
> [deprecation notice](https://github.com/idleberg/vscode-jxa/discussions/2) for
12+
> details.
1013
1114
Language syntax, snippets and build system for AppleScript.
1215

@@ -22,19 +25,24 @@ Launch Quick Open, paste the following command, and press <kbd>Enter</kbd>
2225

2326
### CLI
2427

25-
With [shell commands](https://code.visualstudio.com/docs/editor/command-line) installed, you can use the following command to install the extension:
28+
With [shell commands](https://code.visualstudio.com/docs/editor/command-line)
29+
installed, you can use the following command to install the extension:
2630

2731
`$ code --install-extension idleberg.applescript`
2832

2933
### Packaged Extension
3034

31-
Download the packaged extension from the [release page](https://github.com/idleberg/vscode-applescript/releases) and install it from the command line:
35+
Download the packaged extension from the
36+
[release page](https://github.com/idleberg/vscode-applescript/releases) and
37+
install it from the command line:
3238

3339
```bash
3440
$ code --install-extension path/to/applescript-*.vsix
3541
```
3642

37-
Alternatively, you can download the packaged extension from the [Open VSX Registry](https://open-vsx.org/) or install it using the [`ovsx`](https://www.npmjs.com/package/ovsx) command-line tool:
43+
Alternatively, you can download the packaged extension from the
44+
[Open VSX Registry](https://open-vsx.org/) or install it using the
45+
[`ovsx`](https://www.npmjs.com/package/ovsx) command-line tool:
3846

3947
```bash
4048
$ ovsx get idleberg.applescript
@@ -44,49 +52,51 @@ $ ovsx get idleberg.applescript
4452

4553
### Building
4654

47-
On macOS, you can make use of the following build commands through the [command-palette](https://code.visualstudio.com/docs/editor/codebasics#_command-palette):
55+
On macOS, you can make use of the following build commands through the
56+
[command-palette](https://code.visualstudio.com/docs/editor/codebasics#_command-palette):
4857

4958
- AppleScript: Run Script – <kbd>Shift ⇧</kbd>+<kbd>Option ⌥</kbd>+<kbd>R</kbd>
50-
- AppleScript: Compile Script – <kbd>Shift ⇧</kbd>+<kbd>Option ⌥</kbd>+<kbd>B</kbd>
59+
- AppleScript: Compile Script – <kbd>Shift ⇧</kbd>+<kbd>Option
60+
⌥</kbd>+<kbd>B</kbd>
5161
- AppleScript: Compile Script bundle
5262
- AppleScript: Compile Application
5363

5464
### Settings
5565

56-
You can tweak the defaults for this package, `osacompile` and `osascript` in the package settings.
57-
58-
| Setting | Default | Description |
59-
| ------------------------------ | ---------- | -------------------------------------------------------------------------------------------------- |
60-
| `showNotifications` | `true` | Show build notifications indicating success or failure |
61-
| `alwaysShowOutput` | `false` | Specify whether to show the output panel on errors only or on each build |
62-
| `convertErrorRange` | `false` | Convert error range to line/column |
63-
| `defaultBuildTask` | `"script"` | Specify the default build task when creating a new task file |
64-
| `allowMultiTermination` | `false` | Allows the selection of multiple processes to be terminated |
65-
| `osacompile.executeOnly` | `false` | Save the resulting script as execute-only |
66-
| `osacompile.stayOpen` | `false` | Stay open after run handler |
67-
| `osacompile.startupScreen` | `false` | Show startup-screen |
68-
| `osascript.outputStyle` | - | The flags argument is a string consisting of any of the modifier characters `e`, `h`, `o`, and `s` |
66+
You can tweak the defaults for this package, `osacompile` and `osascript` in the
67+
package settings.
68+
69+
| Setting | Default | Description |
70+
| -------------------------- | ---------- | -------------------------------------------------------------------------------------------------- |
71+
| `showNotifications` | `true` | Show build notifications indicating success or failure |
72+
| `alwaysShowOutput` | `false` | Specify whether to show the output panel on errors only or on each build |
73+
| `convertErrorRange` | `false` | Convert error range to line/column |
74+
| `defaultBuildTask` | `"script"` | Specify the default build task when creating a new task file |
75+
| `allowMultiTermination` | `false` | Allows the selection of multiple processes to be terminated |
76+
| `osacompile.executeOnly` | `false` | Save the resulting script as execute-only |
77+
| `osacompile.stayOpen` | `false` | Stay open after run handler |
78+
| `osacompile.startupScreen` | `false` | Show startup-screen |
79+
| `osascript.outputStyle` | - | The flags argument is a string consisting of any of the modifier characters `e`, `h`, `o`, and `s` |
6980

7081
#### File Encoding
7182

72-
In prior versions of macOS, the default character encoding for AppleScript text files was [Mac Roman](https://www.wikiwand.com/en/Mac_OS_Roman); it is now UTF-8.
83+
In prior versions of macOS, the default character encoding for AppleScript text
84+
files was [Mac Roman](https://www.wikiwand.com/en/Mac_OS_Roman); it is now
85+
UTF-8.
7386

74-
If you are using this extension to edit old AppleScript text files, and your VS Code cannot open the files, you may need to change VS Code's default encoding for AppleScript files in the settings.
87+
You can tweak the default file encoding in your Visual Studio Code settings.
7588

7689
**Example:**
7790

7891
```json
7992
{
8093
"[applescript]": {
81-
"files.encoding": "utf16le"
94+
"files.encoding": "macroman"
8295
}
8396
}
8497
```
8598

86-
**Note:**
87-
88-
However, if an AppleScript file has been edited and compiled in Apple's Script Editor app, it saves the compiled binary into the same AppleScript file, making it unreadable in VS Code. To recover from this, open the AppleScript file in Apple's Script Editor app, and either copy the content from its UI, or use its File > Export to export the file as text-only file.
89-
9099
## License
91100

92-
This work is licensed under [The MIT License](https://opensource.org/licenses/MIT).
101+
This work is licensed under
102+
[The MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)