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
Copy file name to clipboardExpand all lines: docs/solidity_editor.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
Editor
2
2
===============
3
3
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.
5
5
- 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.
7
7
8
8
## Editor displays concerning the Solidity Compiler and the Debugger
9
9
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
13
13

14
14
15
15
## 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.
17
17
18
18

19
19
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.
21
21
- The magnifying glass icons (+/-) on the top left corner are to increase/decrease the font size.
22
22
- The small type on the far right of the Editor is clickable to jump to a section.
23
23
24
24
## TypeScript
25
25
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.
27
27
28
28
The default Workspace contains example TypeScript files.
29
29
30
30
## 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.
32
32
33
33

34
34
## 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.
36
36
37
37

38
38
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 adda new function in a file that contains errors, autocomplete will not be able to find that function because it can’t compile the file.
40
40
41
41

42
42
43
43
## 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.
45
45
46
46

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

51
51
@@ -54,24 +54,24 @@ And the same with Uniswap:
54
54

55
55
56
56
## 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.
58
58
59
59

60
60
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.
62
62
63
63

64
64
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.
66
66
67
67

68
68
69
-
#### Errors on imported files
69
+
#### Errors on Imported Files
70
70
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.
72
72
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.
75
75
76
76

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

96
96
97
-
You can also ‘peek’ the definition inline in the editor. You can then jump to a definition by doubleclicking 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.
98
98
99
99
### References
100
100
By right-clicking, you can display all the references. You can also use the shortcut displayed.
101
101
102
102

103
103
104
-
You can jump to a reference by doubleclicking 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.
105
105
106
106

107
107
## Highlighted References
@@ -116,7 +116,7 @@ When you hover over a term with a definition, the definition will pop up. Hoveri
116
116

117
117
## Files with Errors turn Red
118
118
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.
120
120
121
121
More about the Editor updates in this article: Major Updates to Remix Editor
0 commit comments