Skip to content

Commit 8359fd7

Browse files
authored
Merge pull request #3129 from ethereum/vermouth22-patch-2
Update solidity_editor.md
2 parents fcf2ba0 + fd60402 commit 8359fd7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/solidity_editor.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Editor
22
===============
33

4-
- The Remix uses the Monaco editor. It is the same editor that VS Code uses.
4+
- Remix uses the Monaco editor. This is the same editor used by VSCode.
55
- Remix saves the current file every 5 seconds.
6-
- The Remix editor will highlight keywords in Soldiity, JS, and TS.
6+
- The Remix Editor will highlight keywords in Soldiity, JS, and TS.
77

88
## Editor displays concerning the Solidity Compiler and the Debugger
99
The Editor works with the Soldity Compiler to display warnings and errors in the gutter.
@@ -13,39 +13,39 @@ It also works with the Debugger for inputting breakpoints as well as for highlig
1313
![](images/a-editor-general.png)
1414

1515
## General Operations
16-
Files are open as tabs. When there are too many tabs to display, scrolling with a mouse wheel will horizontally scroll the tabs.
16+
Files are open as tabs. When there are too many tabs to display, scrolling with a mouse wheel will horizontally scroll the tabs.
1717

1818
![](images/a-editor-tabs.png)
1919

20-
- The Play button works on the active tab. If that is a Solidity file, clicking Play will compile it. If a TS or JS file is active, Play will run the script.
20+
- The Play button works on the active tab. If a Solidity file is active, clicking Play will compile it. If a TS or JS file is active, Play will run the script.
2121
- The magnifying glass icons (+/-) on the top left corner are to increase/decrease the font size.
2222
- The small type on the far right of the Editor is clickable to jump to a section.
2323

2424
## TypeScript
2525

26-
The Editor and Script Runner support TypeScript, which mean that you can write TypeScript, have some auto-completion, and run it straight from Remix. As stated above, there is syntax highlighting in TS.
26+
The Editor and Script Runner support TypeScript, which means that you can write TypeScript, have some auto-completion, and run it straight from Remix. As stated above, there is syntax highlighting in TS.
2727

2828
The default Workspace contains example TypeScript files.
2929

3030
## Editor & Autocompile
31-
When autocompile is enabled (in the Settings panel), compilation will occur each time the current file is changed or another file is selected.
31+
When autocompile is enabled (in the Settings panel), compilation will occur each time the current file is changed, or another file is selected.
3232

3333
![](images/a-editor-settings.png)
3434
## Autocomplete
35-
Autocompleting Solidity code happens when you type in the Editor. The Compiler will run in the background, and will process any imports you have. You will see these imports appear in the .deps directory in the File Explorer.
35+
Autocompleting Solidity code happens when you start typing in the Editor. The Compiler will run in the background, and process any imports you have. You will see these imports appear in the .deps directory in the File Explorer.
3636

3737
![](images/a-editor-autocomplete1.png)
3838

39-
**Tip:** If you start with a Solidity file that has errors, the Compiler might not be able to compile it. In that case, autocomplete features will not fully work until the first time a file is successfully compiled. After that, autocomplete will work even if there are errors, but only for the elements the Compiler already knows the meaning of. But if you add, for example, a new function in a file that has errors, autocomplete will not be able to find that function because it can’t compile the file.
39+
**Tip:** If you start with a Solidity file that contains errors, the Compiler might not be able to compile it. In that case, the Editor's autocomplete features will not fully work until after the file is successfully compiled. After that, autocomplete will work even if there are errors, but only for the elements the Compiler already understands. For example, if you add a new function in a file that contains errors, autocomplete will not be able to find that function because it can’t compile the file.
4040

4141
![](images/a-editor-autocomplete.png)
4242

4343
## Auto complete on imports
44-
The autocomplete will offer the option to bring in OpenZeppelin contracts, Uniswap contracts, and the paths to all the files in the current Workspace.
44+
The Editor's autocomplete will offer the option to bring in OpenZeppelin contracts, Uniswap contracts, and the paths to all the files in the current Workspace.
4545

4646
![](images/a-editor-auto-import1.png)
4747

48-
So then when choosing @openzeppelin, you’ll get this:
48+
So, when choosing @openzeppelin, you’ll get this:
4949

5050
![](images/a-editor-auto-oz-import2.png)
5151

@@ -54,24 +54,24 @@ And the same with Uniswap:
5454
![](images/a-editor-auto-uni-import3.png)
5555

5656
## Errors and Warnings
57-
You can tell the Compiler is successful if no errors or warnings are displayed in the Editor. Errors are displayed using squiggly lines. A red line indicates an error, a yellow line is a warning.
57+
You can tell the file was successfully compiled if no errors or warnings are displayed in the Editor. Errors are displayed using squiggly lines. A red line indicates an error, a yellow line is a warning.
5858

5959
![](images/a-editor-error-red-squiggles.png)
6060

61-
Hovering over the squiggle line shows you the message from the Compiler.
61+
Hovering over the squiggly line shows you the message from the Compiler.
6262

6363
![](images/a-editor-error-hover.png)
6464

65-
Tabs and the File Explorer will also show you a file has errors or warnings.
65+
Tabs and the File Explorer will also will also display whether a file contains errors or warnings.
6666

6767
![](images/a-editor-errors-tabs-fe.png)
6868

69-
#### Errors on imported files
69+
#### Errors on Imported Files
7070

71-
A file with errors in one of the files that it imports will also triger an error in the editor. Your main file might not compile, but you will see there is a problem straight away.
71+
A file with errors in one of the files that it imports will also trigger an error in the Editor. Your main file might not compile, but you will see there is a problem immediately.
7272

73-
### Hovering over a error number in the File Explorer
74-
The number of errors in the file is also reported in the File Explorer. Hovering over the number, which indicates the amount of errors/warnings, will display the information from the Compiler.
73+
### Hovering over an Error Number in the File Explorer
74+
The number of errors in a file is also reported in the File Explorer. Hovering over the number, which indicates the amount of errors/warnings, will display the information from the Compiler.
7575

7676
![](images/a-editor-error-fe-num.png)
7777

@@ -94,14 +94,14 @@ You can also right-click on the filename of an import statement and jump to that
9494

9595
![](images/a-editor-goto-def.png)
9696

97-
You can also ‘peek’ the definition inline in the editor. You can then jump to a definition by double clicking on the line on the right hand side.
97+
You can also ‘peek’ at the definition inline in the Editor. You can then jump to a definition by double-clicking on the right hand side of the line.
9898

9999
### References
100100
By right-clicking, you can display all the references. You can also use the shortcut displayed.
101101

102102
![](images/a-editor-refs1.png)
103103

104-
You can jump to a reference by double clicking on the line on the right hand side.
104+
You can jump to a reference by double-clicking on the right hand side of the line.
105105

106106
![](images/a-editor-ref2.png)
107107
## Highlighted References
@@ -116,7 +116,7 @@ When you hover over a term with a definition, the definition will pop up. Hoveri
116116
![](images/a-editor-hover.png)
117117
## Files with Errors turn Red
118118

119-
When a file has an error in it, its name will turn red, both in the File Explorer and on its tab at the top of the Editor.
119+
When a file contains an error, its name will turn red, both in the File Explorer and on its tab at the top of the Editor.
120120

121121
More about the Editor updates in this article: Major Updates to Remix Editor
122122

0 commit comments

Comments
 (0)