diff --git a/README.md b/README.md index 0748157..b5f835b 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ - Directly click on the problem to see the problem description. > :star: **Note:** - > - You can specify the path of the workspace folder to store the problem files by updating the setting `pintia.workspaceFolder`. The default value is:**$HOME/.pintia/codes**. + > - You can specify the path of the workspace folder to store the problem files by updating the setting `pintia.workspaceFolder`. The default value is:**\$HOME/.pintia/codes**. > - You can change the default language by triggering the command: `Pintia: Change Default Language`. --- @@ -86,28 +86,36 @@ And then click `Test custom sample` to quickly test your code. --- -## 2. Settings +## 2. Usage + +Use `Ctrl+P` (in Windows) or `Command+P` (in Mac) to open the command panel and enter `pintia` for quick access to the `Pintia Extension`'s related commands. + +
+ +
+ +## 3. Settings | Setting Name | Description | Default Value | | ------------------------- | ------------------------------------------------------------ | ------------------ | | `pintia.showLocked` | Specify to show the locked problem sets or not. (Some problem sets require verification of the user's reader code before they can be submitted) | `true` | -| `pintia.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `C (gcc)`,`C++ (g++)`,`C (clang)`,`C++ (clang++)`,`Java (javac)`,`Python (python2)`,`Python (python3)`,`Ruby (ruby)`,`Bash (bash)`,`Plaintext (cat)`,`CommonLisp (sbcl)`,`Pascal (fpc)`,`Go (go)`,`Haskell (ghc)`,`Lua (lua)`,`Lua (luajit)`,`C# (mcs)`,`JavaScript (node)`,`OCaml (ocamlc)`,`PHP (php)`,`Perl (perl)`,`AWK (awk)`,`D (dmd)`,`Racket (racket)`,`Vala (valac)`,`Visual Basic (vbnc)`,`Kotlin (kotlinc)`,`Swift (swiftc)`,`Objective-C (gcc)`,`Fortran95 (gfortran)`,`Octave (octave-cli)`,`R (R)`,`ASM (nasm.sh)`,`Rust (rustc)`,`Scala (scalac)`,`Python (pypy3)`,`SQL (SQL)` | `C++ (g++)` | +| `pintia.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `C (gcc)`, `C++ (g++)`, `C (clang)`, `C++ (clang++)`, `Java (javac)`, `Python (python2)`, `Python (python3)`, `Ruby (ruby)`, `Bash (bash)`, `Plaintext (cat)`, `CommonLisp (sbcl)`, `Pascal (fpc)`, `Go (go)`, `Haskell (ghc)`, `Lua (lua)`, `Lua (luajit)`, `C# (mcs)`, `JavaScript (node)`, `OCaml (ocamlc)`, `PHP (php)`, `Perl (perl)`, `AWK (awk)`, `D (dmd)`, `Racket (racket)`, `Vala (valac)`, `Visual Basic (vbnc)`, `Kotlin (kotlinc)`, `Swift (swiftc)`, `Objective-C (gcc)`, `Fortran95 (gfortran)`, `Octave (octave-cli)`, `R (R)`, `ASM (nasm. sh)`, `Rust (rustc)`, `Scala (scalac)`, `Python (pypy3)`, `SQL (SQL)` | `C++ (g++)` | | `pintia.workspaceFolder` | Specify the path of the workspace folder to store the problem files. | `""` | | `pintia.enableStatusBar` | Specify whether the Pintia status bar will be shown or not. | `true` | | `pintia.editor.shortcuts` | Specify the customized shortcuts in editors. Supported values are: `submit`, `test`. | `["submit", "test"]` | | `pintia.paging.pageSize` | Whether to page the problem list when the problem set is too large. It is not paged when pageSize is 0. | `100` | | `pintia.autoCheckIn` | Specify whether to check in Pintia's education supermarket or not when the Pintia Extension is activated. | `false` | -## 3. Want Help? +## 4. Want Help? When you meet any problem, you can check out the [Troubleshooting](https://github.com/jinzcdev/vscode-pintia/wiki/Troubleshooting) and [FAQ](https://github.com/jinzcdev/vscode-pintia/wiki/FAQ) first. If your problem still cannot be addressed, feel free to [file an issue](https://github.com/jinzcdev/vscode-pintia/issues/new/choose). -## 4. Release Notes +## 5. Release Notes Refer to [CHANGELOG](https://github.com/jinzcdev/vscode-pintia/blob/main/CHANGELOG.md) | [中文文档](https://github.com/jinzcdev/vscode-pintia/blob/main/docs/CHANGELOG_zh-CN.md) -## 5. Acknowledgement +## 6. Acknowledgement - The design of the `Pintia Extension` references the design of the [LeetCode](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode) in many of its features. \ No newline at end of file diff --git a/docs/README_zh-CN.md b/docs/README_zh-CN.md index 71b2892..761218c 100644 --- a/docs/README_zh-CN.md +++ b/docs/README_zh-CN.md @@ -53,7 +53,7 @@ > :star: **注意:** > - > - 您可以通过修改配置项 `pintia.workspaceFolder` 来指定存储题目文件的工作区路径。默认值为**$HOME/.pintia/codes** + > - 您可以通过修改配置项 `pintia.workspaceFolder` 来指定存储题目文件的工作区路径。默认值为**\$HOME/.pintia/codes** > > - 您可以通过 `Pintia: Change Default Language` 命令来改变默认语言,使用`Ctrl+P` (in Windows) 或 `Command+P` (in Mac)打开命令面板 @@ -81,39 +81,43 @@ -- 您可以把您的代码放在`@pintia code=start`和`@pintia code=end`之间(在编辑区中输入`ptacode`来快速添加) -- 另外,您可以把您的**自定义测试样例**放在`@pintia test=start`和`@pintia test=end`之间(输入`ptatest`可以快速添加),并点击`Test custom sample` 以快速测试您的代码。 +- 您可以把您的代码放在 `@pintia code=start` 和 `@pintia code=end` 之间(在编辑区中输入 `ptacode` 来快速添加) +- 另外,您可以把您的**自定义测试样例**放在 `@pintia test=start` 和 `@pintia test=end` 之间(输入 `ptatest` 可以快速添加),并点击 `Test custom sample` 以快速测试您的代码。 -> :star: **Note:** 在点击`submit`或`test`提交你的代码时,只有在包裹在`@pintia code=start`和`@pintia code=end`之间的代码会被提交给 Pintia 判题器。 +> :star: **Note:** 在点击 `submit` 或 `test` 提交你的代码时,只有在包裹在 `@pintia code=start` 和 `@pintia code=end` 之间的代码会被提交给 Pintia 判题器。 --- -## 2. 使用 +## 2. 插件使用 -您能通过 +使用 `Ctrl+P` (in Windows) 或 `Command+P` (in Mac)打开命令面板并输入 `pintia` 可快速使用插件的相关命令。 -## 2. 插件配置项 ++ +
+ +## 3. 插件配置项 | 设置名称 | 描述 | 默认值 | | ------------------------- | ------------------------------------------------------------ | ---------------- | | `pintia.showLocked` | 指定是否显示锁定的问题(一些题目集需要验证用户的**读者码**后方可提交) | `true` | -| `pintia.defaultLanguage` | 指定用于解题的默认语言。支持的语言有`C (gcc)`,`C++ (g++)`,`C (clang)`,`C++ (clang++)`,`Java (javac)`,`Python (python2)`,`Python (python3)`,`Ruby (ruby)`。 `Bash (bash)`,`Plaintext (cat)`,`CommonLisp (sbcl)`,`Pascal (fpc)`,`Go (go)`,`Haskell (ghc)`,`Lua (lua)`,`Lua (luajit)`,`C# (mcs)`。 `JavaScript (node)`,`OCaml (ocamlc)`,`PHP (php)`,`Perl (perl)`,`AWK (awk)`,`D (dmd)`,`Racket (racket)`,`Vala (valac)`,`Visual Basic (vbnc)`。 `Kotlin (kotlinc)`,`Swift (swiftc)`,`Objective-C (gcc)`,`Fortran95 (gfortran)`,`Octave (octave-cli)`,`R (R)`, `ASM (nasm. sh)`,`Rust (rustc)`,`Scala (scalac)`,`Python (pypy3)`,`SQL (SQL)` | `C++ (g++)` | +| `pintia.defaultLanguage` | 指定用于解题的默认语言。支持的语言有`C (gcc)`, `C++ (g++)`, `C (clang)`, `C++ (clang++)`, `Java (javac)`, `Python (python2)`, `Python (python3)`, `Ruby (ruby)`, `Bash (bash)`, `Plaintext (cat)`, `CommonLisp (sbcl)`, `Pascal (fpc)`, `Go (go)`, `Haskell (ghc)`, `Lua (lua)`, `Lua (luajit)`, `C# (mcs)`, `JavaScript (node)`, `OCaml (ocamlc)`, `PHP (php)`, `Perl (perl)`, `AWK (awk)`, `D (dmd)`, `Racket (racket)`, `Vala (valac)`, `Visual Basic (vbnc)`, `Kotlin (kotlinc)`, `Swift (swiftc)`, `Objective-C (gcc)`, `Fortran95 (gfortran)`, `Octave (octave-cli)`, `R (R)`, `ASM (nasm. sh)`, `Rust (rustc)`, `Scala (scalac)`, `Python (pypy3)`, `SQL (SQL)` | `C++ (g++)` | | `pintia.workspaceFolder` | 指定工作区文件夹的路径,以存储代码文件 | `""` | | `pintia.enableStatusBar` | 指定是否显示Pintia状态栏 | `true` | | `pintia.editor.shortcuts` | 指定编辑器中的自定义快捷方式。目前仅支持`submit`, `test` | `["提交","测试"]` | | `pintia.paging.pageSize` | 当问题集过大时,是否对问题列表进行分页。当pageSize为0表示不分页 | `100` | | `pintia.autoCheckIn` | 指定当Pintia插件被激活时,是否自动签到Pintia的教育商店 | `false` | -## 3. 需要帮助? +## 4. 需要帮助? 在遇到任何问题时,您可以先查看[故障排除](https://github.com/jinzcdev/vscode-pintia/wiki/Troubleshooting)和[常见问题](https://github.com/jinzcdev/vscode-pintia/wiki/FAQ)。 如果您的问题仍然无法解决,可随时[创建一个新的Issue](https://github.com/jinzcdev/vscode-pintia/issues/new/choose)。 -## 4. 更新日志 +## 5. 更新日志 请参考 [CHANGELOG](https://github.com/jinzcdev/vscode-pintia/blob/main/CHANGELOG.md) | [中文文档](https://github.com/jinzcdev/vscode-pintia/blob/main/docs/CHANGELOG_zh-CN.md) -## 5. 鸣谢 +## 6. 鸣谢 - Pintia Extension 的功能设计参考了[LeetCode](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode)。 \ No newline at end of file diff --git a/docs/imgs/commands.png b/docs/imgs/commands.png new file mode 100644 index 0000000..ba58134 Binary files /dev/null and b/docs/imgs/commands.png differ diff --git a/src/commands/user.ts b/src/commands/user.ts index cb38efa..344be58 100644 --- a/src/commands/user.ts +++ b/src/commands/user.ts @@ -79,7 +79,7 @@ export async function checkedInStatus(): Promise