|
81 | 81 |
|
82 | 82 | --- |
83 | 83 |
|
84 | | -### Show Top Voted Solution |
| 84 | +### Editor Shortcuts |
85 | 85 | <p align="center"> |
86 | | - <img src="https://raw.githubusercontent.com/jdneo/vscode-leetcode/master/docs/imgs/solution.png" alt="Show Top Voted Solution" /> |
| 86 | + <img src="https://raw.githubusercontent.com/jdneo/vscode-leetcode/master/docs/imgs/shortcuts.png" alt="Editor Shortcuts" /> |
87 | 87 | </p> |
88 | 88 |
|
89 | | -- Select `Show Top Voted Solution` will display the top voted solution for you. |
| 89 | +- The extension supports 4 editor shortcuts (aka Code Lens): |
| 90 | + - `Submit`: Submit your answer to LeetCode. |
| 91 | + - `Test`: Test your answer with customized test cases. |
| 92 | + - `Solution`: Show the top voted solution for the current problem. |
| 93 | + - `Description`: Show the problem description page. |
90 | 94 |
|
91 | | ---- |
92 | | - |
93 | | -### Submit the Answer |
94 | | -<p align="center"> |
95 | | - <img src="https://raw.githubusercontent.com/jdneo/vscode-leetcode/master/docs/imgs/submit.png" alt="Submit the Answer" /> |
96 | | -</p> |
97 | | - |
98 | | -- You can submit the answer by clicking `Submit` at the bottom of the file. Or you can right click in the editor and select `Submit to LeetCode`. |
99 | | - |
100 | | -> If you want to hide the shortcuts showing in the editor, just simply set the setting `leetcode.enableShortcuts` to false. |
101 | | -
|
102 | | ---- |
103 | | - |
104 | | -### Test the Answer |
105 | | -<p align="center"> |
106 | | - <img src="https://raw.githubusercontent.com/jdneo/vscode-leetcode/master/docs/imgs/test.png" alt="Test the Answer" /> |
107 | | -</p> |
108 | | - |
109 | | -- You can test the answer by clicking `Test` at the bottom of the file. Or you can right click in the editor and select `Test in LeetCode`. |
110 | | - |
111 | | -- There are 3 ways to test the answer: |
112 | | - - **Test with the default cases** |
113 | | - - **Write test cases in input box** |
114 | | - - **Test with the written cases in file** |
| 95 | + > Note: You can customize the shortcuts using the setting: `leetcode.editor.shortcuts`. By default, only `Submit` and `Test` shortcuts are enabled. |
115 | 96 |
|
116 | 97 | --- |
117 | 98 |
|
|
142 | 123 | | `leetcode.endpoint` | Specify the active endpoint. Supported endpoints are: `leetcode`, `leetcode-cn` | `leetcode` | |
143 | 124 | | `leetcode.outputFolder` | Specify the relative path to save the problem files. Besides using customized path, there are also several reserved words which can be used here: <ul><li>`${tag}`: Categorize the problem according to their tags.<li>`${language}`: Categorize the problem according to their language.</li><li>`${difficulty}`: Categorize the problem according to their difficulty.</li></ul>For example: `problem-${tag}-${difficulty}` | N/A | |
144 | 125 | | `leetcode.enableStatusBar` | Specify whether the LeetCode status bar will be shown or not. | `true` | |
145 | | -| `leetcode.enableShortcuts` | Specify whether the submit and test shortcuts in editor or not. | `true` | |
| 126 | +| **(Deprecated)** `leetcode.enableShortcuts` | Specify whether the submit and test shortcuts in editor or not. | `true` | |
| 127 | +| `leetcode.editor.shortcuts` | Specify the customized shorcuts in editors | `["submit, test"]` | |
146 | 128 | | `leetcode.enableSideMode` | Specify whether `preview`, `solution` and `submission` tab should be grouped into the second editor column when solving a problem. | `true` | |
147 | 129 | | `leetcode.nodePath` | Specify the `Node.js` executable path. | `node` | |
148 | 130 |
|
|
0 commit comments