You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use humanized names for command palette-related instructions
Motivation: copy-pasting a command which is not humanized into the
command palette will result in an empty list of matches. So lets tell
users what they should type.
Copy file name to clipboardExpand all lines: book/03-hacking-atom/sections/03-modify-buffer.asc
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -61,19 +61,19 @@ Next we insert a string into the current text editor with the https://atom.io/do
61
61
62
62
===== Reload the Package
63
63
64
-
Before we can trigger `ascii-art:convert`, we need to load the latest code for our package by reloading the window. Run the command `window:reload` from the command palette or by pressing `ctrl-alt-cmd-l`.
64
+
Before we can trigger `ascii-art:convert`, we need to load the latest code for our package by reloading the window. Run the command "Window: Reload" from the command palette or by pressing `ctrl-alt-cmd-l`.
65
65
66
66
===== Trigger the Command
67
67
68
-
Now open the command panel and search for the `ascii-art:convert` command. But it's not there! To fix this, open _package.json_ and find the property called `activationCommands`. Activation Events speed up load time by allowing Atom to delay a package's activation until it's needed. So remove the existing command and add `ascii-art:convert` to the `activationCommands` array:
68
+
Now open the command panel and search for the "Ascii Art: Convert" command. But it's not there! To fix this, open _package.json_ and find the property called `activationCommands`. Activation commands speed up load time by allowing Atom to delay a package's activation until it's needed. So remove the existing command and use `ascii-art:convert` in `activationCommands`:
69
69
70
70
```json
71
71
"activationCommands": {
72
72
"atom-workspace": "ascii-art:convert"
73
73
}
74
74
```
75
75
76
-
First, reload the window by running the command `window:reload`. Now when you run the `ascii-art:convert` command it will output 'Hello, World!'
76
+
First, reload the window by running the command "Window: Reload" from the command palette. Now when you run the "Ascii Art: Convert" command it will output 'Hello, World!'
77
77
78
78
===== Add a Key Binding
79
79
@@ -98,8 +98,7 @@ Now we need to convert the selected text to ASCII art. To do this we will use th
98
98
}
99
99
```
100
100
101
-
After saving the file, run the command 'update-package-dependencies:update' from
102
-
the Command Palette. This will install the package's node module dependencies, only figlet in this case. You will need to run 'update-package-dependencies:update' whenever you update the dependencies field in your _package.json_ file.
101
+
After saving the file, run the command "Update Package Dependencies: Update" from the Command Palette. This will install the package's node module dependencies, only figlet in this case. You will need to run "Update Package Dependencies: Update" whenever you update the dependencies field in your _package.json_ file.
103
102
104
103
If for some reason this doesn't work, you'll see a message saying ``Failed to update package dependencies'' and you will find a new `npm-debug.log` file in your directory. That file should give you some idea as to what went wrong.
0 commit comments