From d193c683a3d5556429f28b7f37d977a992180530 Mon Sep 17 00:00:00 2001 From: nekosu Date: Thu, 1 Jul 2021 22:19:47 +0800 Subject: [PATCH 1/5] Reconstruct EN for support-object branch Also fix #191 --- content/docs/preferences/extensions/_index.md | 46 ++++++----- content/docs/preferences/language/_index.md | 81 ++++++++----------- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/content/docs/preferences/extensions/_index.md b/content/docs/preferences/extensions/_index.md index 88323443e..f91c406f3 100644 --- a/content/docs/preferences/extensions/_index.md +++ b/content/docs/preferences/extensions/_index.md @@ -5,25 +5,19 @@ weight: 50 ## Code Formatting -### Clang Format +#### Format Code on Manual Save -Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. +Format the code when saving it manually. -**See also** [Setup Clang Format](../../setup/\_index.md#setup-clang-format). - -#### Program +#### Format Code on Auto Save -The path to the `clang-format` executable, or simply `clang-format` if it's in the `PATH` environment variable. +Format the code when auto-saving it. -#### Arguments - -The arguments passed to `clang-format`. It should NOT contain `-i` (the in-place modification option). - -#### Style +### Clang Format -The Clang Format style. The content here is the same as the content of a `.clang-format` file. +Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. +**See also** [Setup Clang Format](../../setup/\_index.md#setup-clang-format). ### YAPF @@ -33,20 +27,34 @@ YAPF is used to format the Python codes. You can click Actions->Format Code or p #### Program -The program of YAPF. It could be one of: +* Clang Format: + + The path to the `clang-format` executable, or simply `clang-format` if it's in the `PATH` environment variable. + +* YAPF: + + The program of YAPF. It could be one of: -- `yapf`: You should be able to run `yapf` in the command line. The arguments can be empty. -- A Python interpreter, i.e. `python`, `python2`, etc. or the path to an interpreter. The arguments should be `-m yapf`. + - `yapf`: You should be able to run `yapf` in the command line. The arguments can be empty. + - A Python interpreter, i.e. `python`, `python2`, etc. or the path to an interpreter. The arguments should be `-m yapf`. -Note that [you need to use Python 2 to format Python 2, use Python 3 to format Python 3](https://github.com/google/yapf#python-versions). So you may need to choose the correct Python interpreter. + Note that [you need to use Python 2 to format Python 2, use Python 3 to format Python 3](https://github.com/google/yapf#python-versions). So you may need to choose the correct Python interpreter. #### Arguments -The arguments passed to the YAPF program. This should be `-m yapf` if the program is a Python interpreter. It should NOT contain `-i` (the in-place modification option). +The arguments passed to the formatter. + +It should NOT contain `-i` (the in-place modification option). + +* YAPF: This should be `-m yapf` if the program is a Python interpreter. #### Style -The YAPF Format style. The content here is the same as the content of a `.style.yapf` file. You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. +The style. The content here is the same as the content of a `.clang-format` file(Clang Format) or a `.style.yapf` file(YAPF). + +* Clang Format: You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. + +* YAPF: You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. ## Language Server diff --git a/content/docs/preferences/language/_index.md b/content/docs/preferences/language/_index.md index c4abbdc4d..37c20cc31 100644 --- a/content/docs/preferences/language/_index.md +++ b/content/docs/preferences/language/_index.md @@ -3,89 +3,74 @@ title: "Language" weight: 20 --- -## General - ### Default Language The default programming language. It's used when opening a new tab and some other places. -## Commands - -### C++ Commands +## Command -#### C++ Compile Command +#### Compile Command -The compilation command for C++. For example: `g++ -Wall`. +For C++ and Java. -The command shouldn't contain the source file and the output file, CP Editor automatically adds them. +The compilation command. For example: -For compilation flags, please refer to the manual of the compiler. For example, you may want to add `-std=c++14` in the compile command to use C++14. +* C++: `g++ -Wall`. -#### C++ Executable File Path +* Java: `javac`. -The path of the executable file, i.e. the argument of the `-o` option of the compiler. +The command shouldn't contain the source file, the output file(C++) or the class path(Java), CP Editor automatically adds them. -If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.md#temporary-directory)). +For compilation flags, please refer to the manual of the compiler. For example: -You can use some place holders for this setting: - -- `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. -- `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.md#temporary-directory). - -For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. - -#### C++ Run Arguments - -The arguments passed to the program when executing it. It's usually not needed in competitive programming. +* C++: You may want to add `-std=c++14` in the compile command to use C++14. -#### C++ Compiler Output Codec +#### Compiler Output Codec The text codec of the compiler output (warnings, errors, etc.), used to display the messages from the compiler in CP Editor. It could be useful if you are using locales for your compiler and the compiler messages are not English. -### Java Commands +#### Executable File Path -#### Java Compile Command +For C++ and Java. -The compilation command for Java. For example: `javac`. +* C++: The path of the executable file, i.e. the argument of the `-o` option of the compiler. -The command shouldn't contain the source file and the class path, CP Editor automatically adds them. +* Java: The path to save the class files. -#### Java Class Path -The path to save the class files. - -Please refer to [C++ Executable File Path](#c-executable-file-path) for the details. +If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.md#temporary-directory)). -#### Java Class Name +You can use some place holders for this setting: -The name of the main class of your solution. +- `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. +- `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.md#temporary-directory). -You can use an arbitrary name for your source file. When compiling, CP Editor automatically saves your code to a file with the class name. +For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. -#### Java Run Command +#### Class Name -The command to run your solution. For example `java`. +For Java. -This command shouldn't contain the class path or the class name, CP Editor automatically adds them. +The name of the main class of your solution. -#### Java Run Arguments +You can use an arbitrary name for your source file. When compiling, CP Editor automatically saves your code to a file with the class name. -The arguments passed to the program when executing it. It's usually not needed in competitive programming. +#### Run Command -#### Java Compiler Output Codec +For Java and Python. -Please refer to [C++ Compiler Output Codec](#c-compiler-output-codec). +The command to run your code. For example: -### Python Commands +* Java: `java`. -#### Python Run Command +* Python: `python`/`python2`/`python3`. -The command to run a python code. It's usually one of `python`/`python2`/`python3`. +This command shouldn't contain the class path(Java) or the class name(Java), CP Editor automatically adds them. -#### Python Run Arguments +#### Run Arguments The arguments passed to the program when executing it. It's usually not needed in competitive programming. @@ -128,13 +113,13 @@ Then you can use `int main` as the regex, `end` as the offset type, and `9` as t ### Manage Snippets -You can add/delete/rename snippets in "Language->XXX->XXX Snippet". You can use Ctrl+N for "Add", Ctrl+W for "Del" and F2 for "Rename". +You can add/delete/rename snippets in "Language->Language Config->XXX->Snippet". You can use Ctrl+N for "Add", Ctrl+W for "Del" and F2 for "Rename". You can also import snippets from files or extract your snippets to files in the "More" menu on the snippet page. ### Use Snippets -You can insert a snippet into the code editor by either clicking "Actions->Use Snippets" or pressing Ctrl+T. +You can insert a snippet into the code editor by either clicking "Actions->Use Snippets" or pressing Ctrl+T. When choosing a snippet, you can enter the first few characters of the snippet name, and it will be auto-completed. From 58bc2ef62c1e246e597a7344f8f04f0b4f6d856e Mon Sep 17 00:00:00 2001 From: neko-para Date: Thu, 1 Jul 2021 14:20:26 +0000 Subject: [PATCH 2/5] style: format Markdown files --- content/docs/preferences/extensions/_index.md | 16 ++++++++-------- content/docs/preferences/language/_index.md | 15 +++++++-------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/content/docs/preferences/extensions/_index.md b/content/docs/preferences/extensions/_index.md index f91c406f3..0fd666e00 100644 --- a/content/docs/preferences/extensions/_index.md +++ b/content/docs/preferences/extensions/_index.md @@ -27,12 +27,12 @@ YAPF is used to format the Python codes. You can click Actions->Format Code or p #### Program -* Clang Format: - +- Clang Format: + The path to the `clang-format` executable, or simply `clang-format` if it's in the `PATH` environment variable. -* YAPF: - +- YAPF: + The program of YAPF. It could be one of: - `yapf`: You should be able to run `yapf` in the command line. The arguments can be empty. @@ -42,19 +42,19 @@ YAPF is used to format the Python codes. You can click Actions->Format Code or p #### Arguments -The arguments passed to the formatter. +The arguments passed to the formatter. It should NOT contain `-i` (the in-place modification option). -* YAPF: This should be `-m yapf` if the program is a Python interpreter. +- YAPF: This should be `-m yapf` if the program is a Python interpreter. #### Style The style. The content here is the same as the content of a `.clang-format` file(Clang Format) or a `.style.yapf` file(YAPF). -* Clang Format: You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. +- Clang Format: You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. -* YAPF: You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. +- YAPF: You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. ## Language Server diff --git a/content/docs/preferences/language/_index.md b/content/docs/preferences/language/_index.md index 37c20cc31..52dbeae7d 100644 --- a/content/docs/preferences/language/_index.md +++ b/content/docs/preferences/language/_index.md @@ -15,15 +15,15 @@ For C++ and Java. The compilation command. For example: -* C++: `g++ -Wall`. +- C++: `g++ -Wall`. -* Java: `javac`. +- Java: `javac`. The command shouldn't contain the source file, the output file(C++) or the class path(Java), CP Editor automatically adds them. For compilation flags, please refer to the manual of the compiler. For example: -* C++: You may want to add `-std=c++14` in the compile command to use C++14. +- C++: You may want to add `-std=c++14` in the compile command to use C++14. #### Compiler Output Codec @@ -35,10 +35,9 @@ It could be useful if you are using locales for your compiler and the compiler m For C++ and Java. -* C++: The path of the executable file, i.e. the argument of the `-o` option of the compiler. - -* Java: The path to save the class files. +- C++: The path of the executable file, i.e. the argument of the `-o` option of the compiler. +- Java: The path to save the class files. If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.md#temporary-directory)). @@ -64,9 +63,9 @@ For Java and Python. The command to run your code. For example: -* Java: `java`. +- Java: `java`. -* Python: `python`/`python2`/`python3`. +- Python: `python`/`python2`/`python3`. This command shouldn't contain the class path(Java) or the class name(Java), CP Editor automatically adds them. From cae6aca4ddd6d6636602787a7f73482c73f36214 Mon Sep 17 00:00:00 2001 From: nekosu Date: Thu, 1 Jul 2021 22:43:44 +0800 Subject: [PATCH 3/5] Update zh translation. Fix outdated anchor. --- content/docs/faq/_index.md | 2 +- content/docs/faq/_index.ru.md | 2 +- content/docs/faq/_index.zh.md | 2 +- content/docs/preferences/extensions/_index.md | 14 +--- .../docs/preferences/extensions/_index.zh.md | 38 +++++---- content/docs/preferences/language/_index.md | 16 ++-- .../docs/preferences/language/_index.zh.md | 78 ++++++++----------- content/docs/setup/_index.md | 6 +- content/docs/setup/_index.zh.md | 6 +- 9 files changed, 68 insertions(+), 96 deletions(-) diff --git a/content/docs/faq/_index.md b/content/docs/faq/_index.md index 4bca4b4b6..88447a4bc 100644 --- a/content/docs/faq/_index.md +++ b/content/docs/faq/_index.md @@ -27,4 +27,4 @@ You need to install a [Language Server program](https://microsoft.github.io/lang ### My code gets TLE on every first execution after compilation. -It's probably because your anti-virus software is scanning your program. A possible solution is to [set the output directory of the executable files](../preferences/language/\_index.md#c-executable-file-path) (for example, you can set it to `D:/cpeditor-executables/${basename}`), and add that directory (`D:/cpeditor-executables` in the example) in the whitelist of your anti-virus software. +It's probably because your anti-virus software is scanning your program. A possible solution is to [set the output directory of the executable files](../preferences/language/\_index.md#executable-file-path) (for example, you can set it to `D:/cpeditor-executables/${basename}`), and add that directory (`D:/cpeditor-executables` in the example) in the whitelist of your anti-virus software. diff --git a/content/docs/faq/_index.ru.md b/content/docs/faq/_index.ru.md index 17c766aaa..b17c3ef18 100644 --- a/content/docs/faq/_index.ru.md +++ b/content/docs/faq/_index.ru.md @@ -27,4 +27,4 @@ You need to install a [Language Server program](https://microsoft.github.io/lang ### My code gets TLE on every first execution after compilation. -It's probably because your anti-virus software is scanning your program. A possible solution is to [set the output directory of the executable files](../preferences/language/\_index.ru.md#c-executable-file-path) (for example, you can set it to `D:/cpeditor-executables/${basename}`), and add that directory (`D:/cpeditor-executables` in the example) in the whitelist of your anti-virus software. +It's probably because your anti-virus software is scanning your program. A possible solution is to [set the output directory of the executable files](../preferences/language/\_index.ru.md#executable-file-path) (for example, you can set it to `D:/cpeditor-executables/${basename}`), and add that directory (`D:/cpeditor-executables` in the example) in the whitelist of your anti-virus software. diff --git a/content/docs/faq/_index.zh.md b/content/docs/faq/_index.zh.md index 8100a7d45..a8a6ca74f 100644 --- a/content/docs/faq/_index.zh.md +++ b/content/docs/faq/_index.zh.md @@ -28,4 +28,4 @@ CF Tool 需要在使用前进行配置。请在终端中执行 `cf config` 以 ### 我的代码每次首次运行时都超时。 -这很可能是因为你的杀毒软件在扫描你的程序。一个可能的解决方法是,[设置可执行文件的输出目录](../preferences/language/\_index.zh.md#c-可执行文件路径)(例如,你可以将其设置为 `D:/cpeditor-executables/${basename}`),然后将这个目录(在上面的例子中,即 `D:/cpeditor-executables`)加到杀毒软件的白名单中。 +这很可能是因为你的杀毒软件在扫描你的程序。一个可能的解决方法是,[设置可执行文件的输出目录](../preferences/language/\_index.zh.md#可执行文件路径)(例如,你可以将其设置为 `D:/cpeditor-executables/${basename}`),然后将这个目录(在上面的例子中,即 `D:/cpeditor-executables`)加到杀毒软件的白名单中。 diff --git a/content/docs/preferences/extensions/_index.md b/content/docs/preferences/extensions/_index.md index 0fd666e00..787a1e519 100644 --- a/content/docs/preferences/extensions/_index.md +++ b/content/docs/preferences/extensions/_index.md @@ -5,14 +5,6 @@ weight: 50 ## Code Formatting -#### Format Code on Manual Save - -Format the code when saving it manually. - -#### Format Code on Auto Save - -Format the code when auto-saving it. - ### Clang Format Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. @@ -42,15 +34,13 @@ YAPF is used to format the Python codes. You can click Actions->Format Code or p #### Arguments -The arguments passed to the formatter. - -It should NOT contain `-i` (the in-place modification option). +The arguments passed to the formatter. It should NOT contain `-i` (the in-place modification option). - YAPF: This should be `-m yapf` if the program is a Python interpreter. #### Style -The style. The content here is the same as the content of a `.clang-format` file(Clang Format) or a `.style.yapf` file(YAPF). +The content here is the same as the content of a `.clang-format` file(Clang Format) or a `.style.yapf` file(YAPF). - Clang Format: You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. diff --git a/content/docs/preferences/extensions/_index.zh.md b/content/docs/preferences/extensions/_index.zh.md index 0d8d4d2bf..fb4a21944 100644 --- a/content/docs/preferences/extensions/_index.zh.md +++ b/content/docs/preferences/extensions/_index.zh.md @@ -11,20 +11,6 @@ Clang Format 是格式化 C/C++ 和 Java 代码的工具。你可以点击 动 **参见** [安装 Clang Format](../../setup/\_index.zh.md#安装-clang-format)。 -#### 程序 - -`clang-format` 可执行文件的路径。如果它已经在 `PATH` 环境变量中,只需填写 `clang-format` 即可。 - -#### 参数 - -向 `clang-format` 传递的参数。它不应包含 `-i`(就地修改选项)。 - -#### 风格 - -Clang Format 格式化代码的风格。这里的内容和 `.clang-format` 的内容一致。 - -你可以查看 [Clang-Format Style Options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) 或其他资料以获取关于代码格式化风格的相关信息。 - ### YAPF YAPF 是格式化 Python 代码的工具。你可以点击 动作->格式化代码 或按快捷键 Ctrl+Shift+I 来格式化代码。如果你选择了代码的一部分,只有被选择的行会被格式化。 @@ -33,20 +19,32 @@ YAPF 是格式化 Python 代码的工具。你可以点击 动作->格式化代 #### 程序 -YAPF 的程序,它可以是如下两项之一: +- Clang Format + + `clang-format` 可执行文件的路径。如果它已经在 `PATH` 环境变量中,只需填写 `clang-format` 即可。 + +- YAPF: -- `yapf`:需要能在命令行下执行 `yapf` 命令。参数可以为空。 -- Python 解释器的程序名,如 `python`,`python2` 等。参数应该为 `-m yapf`。 + YAPF 的程序,它可以是如下两项之一: -注意,你需要 [使用 Python 2 来格式化 Python 2 代码,使用 Python 3 来格式化 Python 3 代码](https://github.com/google/yapf#python-versions)。因此你需要选择正确的 Python 解释器程序。 + - `yapf`:需要能在命令行下执行 `yapf` 命令。参数可以为空。 + - Python 解释器的程序名,如 `python`,`python2` 等。参数应该为 `-m yapf`。 + + 注意,你需要 [使用 Python 2 来格式化 Python 2 代码,使用 Python 3 来格式化 Python 3 代码](https://github.com/google/yapf#python-versions)。因此你需要选择正确的 Python 解释器程序。 #### 参数 -传递给 YAPF 程序的参数。如果在程序一栏里填写的是 Python 解释器,这里的参数应该是 `-m yapf`。参数中不应包含 `-i`(就地修改选项)。 +向格式化程序传递的参数。它不应包含 `-i`(就地修改选项)。 + +- YAPF: 如果在程序一栏里填写的是 Python 解释器,这里的参数应该是 `-m yapf`。 #### 风格 -YAPF 格式化代码的风格,这里的内容和 `.style.yapf` 的内容一致。你可以运行 `yapf --style-help`,查看 [文档](https://github.com/google/yapf#formatting-style) 或其他资料以获取关于代码格式化风格的相关信息。 +这里的内容和 `.clang-format`(Clang Format) 或 `.style.yapf`(YAPF) 的内容一致。 + +- Clang Format: 你可以查看 [Clang-Format Style Options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) 或其他资料以获取关于代码格式化风格的相关信息。 + +- YAPF: 你可以运行 `yapf --style-help`,查看 [文档](https://github.com/google/yapf#formatting-style) 或其他资料以获取关于代码格式化风格的相关信息。 ## Language Server diff --git a/content/docs/preferences/language/_index.md b/content/docs/preferences/language/_index.md index 52dbeae7d..e415e14b7 100644 --- a/content/docs/preferences/language/_index.md +++ b/content/docs/preferences/language/_index.md @@ -9,7 +9,7 @@ The default programming language. It's used when opening a new tab and some othe ## Command -#### Compile Command +### Compile Command For C++ and Java. @@ -25,15 +25,15 @@ For compilation flags, please refer to the manual of the compiler. For example: - C++: You may want to add `-std=c++14` in the compile command to use C++14. -#### Compiler Output Codec +### Compiler Output Codec + +For C++ and Java. The text codec of the compiler output (warnings, errors, etc.), used to display the messages from the compiler in CP Editor. It could be useful if you are using locales for your compiler and the compiler messages are not English. -#### Executable File Path - -For C++ and Java. +### Executable File Path - C++: The path of the executable file, i.e. the argument of the `-o` option of the compiler. @@ -49,7 +49,7 @@ You can use some place holders for this setting: For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. -#### Class Name +### Class Name For Java. @@ -57,7 +57,7 @@ The name of the main class of your solution. You can use an arbitrary name for your source file. When compiling, CP Editor automatically saves your code to a file with the class name. -#### Run Command +### Run Command For Java and Python. @@ -69,7 +69,7 @@ The command to run your code. For example: This command shouldn't contain the class path(Java) or the class name(Java), CP Editor automatically adds them. -#### Run Arguments +### Run Arguments The arguments passed to the program when executing it. It's usually not needed in competitive programming. diff --git a/content/docs/preferences/language/_index.zh.md b/content/docs/preferences/language/_index.zh.md index f733c1a73..f2816ee5a 100644 --- a/content/docs/preferences/language/_index.zh.md +++ b/content/docs/preferences/language/_index.zh.md @@ -11,83 +11,67 @@ weight: 20 ## 命令 -### C++ 命令 +### 编译命令 -#### C++ 编译命令 +适用于 C++ 和 Java 。 -设置编译 C++ 时的编译命令,例如 `g++ -Wall`。 +设置编译时的编译命令,例如: -该命令中不应包含源代码和输出文件的名称,CP Editor 将会自动添加它们。 +- C++: `g++ -Wall`。 -详细的编译选项请参考编译器的文档。 - -#### C++ 可执行文件路径 - -设置可执行文件的路径,即编译命令中 `-o` 选项后的参数。 - -如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../general/\_index.zh.md#临时文件夹) 的位置有关)。 - -该设置中,你可以使用如下参数: - -- `${filename}`:源代码的完整文件名。如果当前标签是未命名标签,则完整文件名是 `sol.cpp`。 -- `${basename}`:将 `${filename}` 去掉扩展名(`.cpp` 等)后的文件名。 -- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../general/\_index.zh.md#临时文件夹) 的路径。 +- Java: `javac`。 -例如,使用 `${tmpdir}/${basename}` 将会把可执行文件存储在临时文件夹下。如果你不想要存储可执行文件的话,可以这样设定路径。而 `executables/${basename}` 将会把可执行文件存储在源代码所在目录的下的 `executables` 文件夹。 +该命令中不应包含源代码、输出文件的名称(C++)或类路径(Java),CP Editor 将会自动添加它们。 -#### C++ 运行参数 +详细的编译选项请参考编译器的文档。 -设置执行 C++ 程序需要的参数。在算法竞赛中一般留空即可。 +### 编译器输出编码 -#### C++ 编译器输出编码 +适用于 C++ 和 Java 。 设置当编译器输出警告,错误等消息时使用的编码。 如果输出的警告和错误信息不是英文,合理配置该设置可以避免输出信息出现乱码。 -### Java 命令 +### 可执行文件路径 + +- C++: 设置可执行文件的路径,即编译命令中 `-o` 选项后的参数。 -#### Java 编译命令 +- Java: 设置编译后存储 Java 类文件的位置。 -设置编译 Java 源代码的编译命令,例如 `javac`。 +如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../general/\_index.zh.md#临时文件夹) 的位置有关)。 -该命令中不应包含源代码和类路径,CP Editor 将会自动添加它们。 +该设置中,你可以使用如下参数: -#### Java 类路径 +- `${filename}`:源代码的完整文件名。如果当前标签是未命名标签,则完整文件名是 `sol.cpp`。 +- `${basename}`:将 `${filename}` 去掉扩展名(`.cpp` 等)后的文件名。 +- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../general/\_index.zh.md#临时文件夹) 的路径。 -设置编译后存储 Java 类文件的位置。 +例如,使用 `${tmpdir}/${basename}` 将会把可执行文件存储在临时文件夹下。如果你不想要存储可执行文件的话,可以这样设定路径。而 `executables/${basename}` 将会把可执行文件存储在源代码所在目录的下的 `executables` 文件夹。 -更多细节详见 [C++ 可执行文件路径](#c-可执行文件路径)。 +### 类名称 -#### Java 类名称 +适用于 Java 。 设置你的源代码中主类的名字。 源代码的名字不必与主类名相同。当编译时,CP Editor 将会自动将源代码保存在一个与主类名称相同的文件中。 -#### Java 运行命令 - -设置执行 Java 程序时的命令。例如 `java`。 - -该命令中不应出现类路径或类名,CP Editor 会自动添加它们。 - -#### Java 运行参数 - -设置执行 Java 程序需要的参数。在算法竞赛中一般留空即可。 +### 运行命令 -#### Java 编译器输出源码 +适用于 Java 和 Python 。 -详见 [C++ 编译器输出编码](#c-编译器输出编码)。 +设置执行程序时的命令。例如: -### Python 命令 +- Java: `java`。 -#### Python 运行命令 +- Python: `python`、`python2`、`python3`。 -设置运行 Python 源代码的命令。一般为 `python`,`python2` 或 `python3`。 +该命令中不应出现类路径(Java)或类名(Java),CP Editor 会自动添加它们。 -#### Python 运行命令 +### 运行参数 -设置执行 Python 程序需要的参数。在算法竞赛中一般留空即可。 +设置执行程序需要的参数。在算法竞赛中一般留空即可。 ## 模板 @@ -128,13 +112,13 @@ int main() ### 管理代码片段 -你可以在 “语言->XXX->XXX 代码片段中” 添加,删除,重命名代码片段。你可以使用 Ctrl+N 作为添加的快捷键,Ctrl+W 作为删除的快捷键,F2 作为重命名的快捷键。 +你可以在 “语言->语言配置->XXX->代码片段中” 添加,删除,重命名代码片段。你可以使用 Ctrl+N 作为添加的快捷键,Ctrl+W 作为删除的快捷键,F2 作为重命名的快捷键。 你也可以在 “更多” 菜单中导入或导出代码片段。 ### 使用代码片段 -你可以通过 “动作->使用代码片段” 或按下 Ctrl+T 来使用代码片段。 +你可以通过 “动作->使用代码片段” 或按下 Ctrl+T 来使用代码片段。 当你在挑选代码片段时,你可以在搜索框中输入代码片段名的前几个字符,以更快找到相应的片段。 diff --git a/content/docs/setup/_index.md b/content/docs/setup/_index.md index e583060a7..072f1aeb0 100644 --- a/content/docs/setup/_index.md +++ b/content/docs/setup/_index.md @@ -15,7 +15,7 @@ You can change the UI language in [Preferences->Appearance->General->UI Language You need to install `g++` / `python` / `java` depending on which language you are using. You need to add them to system PATH to have them found by CP Editor. -Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language/\_index.md#c-commands). +Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages](../preferences/language/\_index.md#commands). ## Setup CF Tool @@ -40,13 +40,13 @@ You can install it from the addon/extension markets: CP Editor uses [Clang Format](http://releases.llvm.org/download.html) to format your C/C++ and Java code. -You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions/\_index.md#clang-format). +You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#clang-format). ### Setup YAPF CP Editor uses [YAPF](https://github.com/google/yapf) to format your Python code. -It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting->YAPF](../preferences/extensions/\_index.md#yapf). +It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#yapf). ## Setup Language Server diff --git a/content/docs/setup/_index.zh.md b/content/docs/setup/_index.zh.md index 6134de999..b8462dc06 100644 --- a/content/docs/setup/_index.zh.md +++ b/content/docs/setup/_index.zh.md @@ -15,7 +15,7 @@ description: 完成 CP Editor 的初始化以做好使用准备 根据你使用的编程语言,你需要安装 `g++` / `python` / `java` 等环境。你需要将它们加入 `PATH` 环境变量以使 CP Editor 能找到它们。 -接下来在设置页面设置编译与运行命令。例如,你可以在 [设置->语言->C++->C++ 命令](../preferences/language/\_index.zh.md#c-命令) 中设置 C++ 的相关命令。 +接下来在设置页面设置编译与运行命令。例如,你可以在 [设置->语言](../preferences/language/\_index.zh.md#命令) 中设置 C++ 的相关命令。 ## 安装 CF Tool @@ -40,13 +40,13 @@ description: 完成 CP Editor 的初始化以做好使用准备 CP Editor 使用 [Clang Format](http://releases.llvm.org/download.html) 来格式化 C/C++ 以及 Java 代码。 -你需要将其加入 `PATH` 环境变量,或是在 [设置->扩展->Clang Format](../preferences/extensions/\_index.zh.md#clang-format) 中设置其路径。 +你需要将其加入 `PATH` 环境变量,或是在 [设置->扩展->代码格式化](../preferences/extensions/\_index.zh.md#clang-format) 中设置其路径。 ### 安装 YAPF CP Editor 使用 [YAPF](https://github.com/google/yapf) 来格式化 Python 代码。 -[安装](https://github.com/google/yapf#installation) 后应该就可以使用了。如果不能,请在 [设置->扩展->代码格式化->YAPF](../preferences/extensions/\_index.zh.md#yapf) 进行设置。 +[安装](https://github.com/google/yapf#installation) 后应该就可以使用了。如果不能,请在 [设置->扩展->代码格式化](../preferences/extensions/\_index.zh.md#yapf) 进行设置。 ## 安装 Language Server From e02e79dd33f7c8717e2fd04eeccc81dfdd7c68cf Mon Sep 17 00:00:00 2001 From: nekosu Date: Thu, 1 Jul 2021 22:51:02 +0800 Subject: [PATCH 4/5] fix links Copy en to ru --- .../docs/preferences/extensions/_index.ru.md | 46 +++++----- content/docs/preferences/language/_index.md | 2 +- .../docs/preferences/language/_index.ru.md | 88 ++++++++----------- content/docs/setup/_index.ru.md | 12 +-- 4 files changed, 65 insertions(+), 83 deletions(-) diff --git a/content/docs/preferences/extensions/_index.ru.md b/content/docs/preferences/extensions/_index.ru.md index bbe80cee2..787a1e519 100644 --- a/content/docs/preferences/extensions/_index.ru.md +++ b/content/docs/preferences/extensions/_index.ru.md @@ -9,48 +9,46 @@ weight: 50 Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -**See also** [Setup Clang Format](../../setup/\_index.ru.md#setup-clang-format). +**See also** [Setup Clang Format](../../setup/\_index.md#setup-clang-format). -#### Program - -The path to the `clang-format` executable, or simply `clang-format` if it's in the `PATH` environment variable. +### YAPF -#### Arguments +YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only these lines will be formatted. -The arguments passed to `clang-format`. It should NOT contain `-i` (the in-place modification option). +**See also** [Setup YAPF](../../setup/\_index.md#setup-yapf). -#### Style +#### Program -The Clang Format style. The content here is the same as the content of a `.clang-format` file. +- Clang Format: -You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. + The path to the `clang-format` executable, or simply `clang-format` if it's in the `PATH` environment variable. -### YAPF +- YAPF: -YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only these lines will be formatted. + The program of YAPF. It could be one of: -**See also** [Setup YAPF](../../setup/\_index.ru.md#setup-yapf). + - `yapf`: You should be able to run `yapf` in the command line. The arguments can be empty. + - A Python interpreter, i.e. `python`, `python2`, etc. or the path to an interpreter. The arguments should be `-m yapf`. -#### Program + Note that [you need to use Python 2 to format Python 2, use Python 3 to format Python 3](https://github.com/google/yapf#python-versions). So you may need to choose the correct Python interpreter. -The program of YAPF. It could be one of: +#### Arguments -- `yapf`: You should be able to run `yapf` in the command line. The arguments can be empty. -- A Python interpreter, i.e. `python`, `python2`, etc. or the path to an interpreter. The arguments should be `-m yapf`. +The arguments passed to the formatter. It should NOT contain `-i` (the in-place modification option). -Note that [you need to use Python 2 to format Python 2, use Python 3 to format Python 3](https://github.com/google/yapf#python-versions). So you may need to choose the correct Python interpreter. +- YAPF: This should be `-m yapf` if the program is a Python interpreter. -#### Arguments +#### Style -The arguments passed to the YAPF program. This should be `-m yapf` if the program is a Python interpreter. It should NOT contain `-i` (the in-place modification option). +The content here is the same as the content of a `.clang-format` file(Clang Format) or a `.style.yapf` file(YAPF). -#### Style +- Clang Format: You can read [Clang-Format Style Options documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) or search for other materials to learn how to write the styles. -The YAPF Format style. The content here is the same as the content of a `.style.yapf` file. You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. +- YAPF: You can check all possible configurations by running `yapf --style-help`, read the [documentation](https://github.com/google/yapf#formatting-style) or search for other materials to learn how to write the styles. ## Language Server -**See also** [Setup Language Server](../../setup/\_index.ru.md#setup-language-server). +**See also** [Setup Language Server](../../setup/\_index.md#setup-language-server). ### Use Linting with Language Server @@ -74,7 +72,7 @@ For example, if you are using `pyls` for Python, you probably want to use `pytho ## Competitive Companion -**See also** [Setup Competitive Companion](../../setup/\_index.ru.md#setup-competitive-companion). +**See also** [Setup Competitive Companion](../../setup/\_index.md#setup-competitive-companion). ### Open New Tabs @@ -114,7 +112,7 @@ You can use [CF Tool](https://github.com/xalanq/cf-tool/) to submit your solutio To submit a solution, you have to either parse a problem by [Competitive Companion](#competitive-companion) from Codeforces or manually set the problem URL of a tab in the context menu of it. -**See also** [Setup CF Tool](../../setup/\_index.ru.md#setup-cf-tool). +**See also** [Setup CF Tool](../../setup/\_index.md#setup-cf-tool). ### Path diff --git a/content/docs/preferences/language/_index.md b/content/docs/preferences/language/_index.md index e415e14b7..9a351154c 100644 --- a/content/docs/preferences/language/_index.md +++ b/content/docs/preferences/language/_index.md @@ -7,7 +7,7 @@ weight: 20 The default programming language. It's used when opening a new tab and some other places. -## Command +## Commands ### Compile Command diff --git a/content/docs/preferences/language/_index.ru.md b/content/docs/preferences/language/_index.ru.md index 04038ad53..9a351154c 100644 --- a/content/docs/preferences/language/_index.ru.md +++ b/content/docs/preferences/language/_index.ru.md @@ -3,89 +3,73 @@ title: "Language" weight: 20 --- -## General - ### Default Language The default programming language. It's used when opening a new tab and some other places. ## Commands -### C++ Commands - -#### C++ Compile Command - -The compilation command for C++. For example: `g++ -Wall`. - -The command shouldn't contain the source file and the output file, CP Editor automatically adds them. - -For compilation flags, please refer to the manual of the compiler. For example, you may want to add `-std=c++14` in the compile command to use C++14. +### Compile Command -#### C++ Executable File Path +For C++ and Java. -The path of the executable file, i.e. the argument of the `-o` option of the compiler. +The compilation command. For example: -If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.ru.md#temporary-directory)). +- C++: `g++ -Wall`. -You can use some place holders for this setting: +- Java: `javac`. -- `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. -- `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.ru.md#temporary-directory). +The command shouldn't contain the source file, the output file(C++) or the class path(Java), CP Editor automatically adds them. -For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. +For compilation flags, please refer to the manual of the compiler. For example: -#### C++ Run Arguments +- C++: You may want to add `-std=c++14` in the compile command to use C++14. -The arguments passed to the program when executing it. It's usually not needed in competitive programming. +### Compiler Output Codec -#### C++ Compiler Output Codec +For C++ and Java. The text codec of the compiler output (warnings, errors, etc.), used to display the messages from the compiler in CP Editor. It could be useful if you are using locales for your compiler and the compiler messages are not English. -### Java Commands +### Executable File Path -#### Java Compile Command +- C++: The path of the executable file, i.e. the argument of the `-o` option of the compiler. -The compilation command for Java. For example: `javac`. +- Java: The path to save the class files. -The command shouldn't contain the source file and the class path, CP Editor automatically adds them. +If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.md#temporary-directory)). -#### Java Class Path +You can use some place holders for this setting: -The path to save the class files. +- `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. +- `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.md#temporary-directory). + +For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. -Please refer to [C++ Executable File Path](#c-executable-file-path) for the details. +### Class Name -#### Java Class Name +For Java. The name of the main class of your solution. You can use an arbitrary name for your source file. When compiling, CP Editor automatically saves your code to a file with the class name. -#### Java Run Command - -The command to run your solution. For example `java`. - -This command shouldn't contain the class path or the class name, CP Editor automatically adds them. - -#### Java Run Arguments - -The arguments passed to the program when executing it. It's usually not needed in competitive programming. +### Run Command -#### Java Compiler Output Codec +For Java and Python. -Please refer to [C++ Compiler Output Codec](#c-compiler-output-codec). +The command to run your code. For example: -### Python Commands +- Java: `java`. -#### Python Run Command +- Python: `python`/`python2`/`python3`. -The command to run a python code. It's usually one of `python`/`python2`/`python3`. +This command shouldn't contain the class path(Java) or the class name(Java), CP Editor automatically adds them. -#### Python Run Arguments +### Run Arguments The arguments passed to the program when executing it. It's usually not needed in competitive programming. @@ -103,7 +87,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general/\_index.ru.md#regular-expression) +1. [Regex](../general/\_index.md#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -128,13 +112,13 @@ Then you can use `int main` as the regex, `end` as the offset type, and `9` as t ### Manage Snippets -You can add/delete/rename snippets in "Language->XXX->XXX Snippet". You can use Ctrl+N for "Add", Ctrl+W for "Del" and F2 for "Rename". +You can add/delete/rename snippets in "Language->Language Config->XXX->Snippet". You can use Ctrl+N for "Add", Ctrl+W for "Del" and F2 for "Rename". You can also import snippets from files or extract your snippets to files in the "More" menu on the snippet page. ### Use Snippets -You can insert a snippet into the code editor by either clicking "Actions->Use Snippets" or pressing Ctrl+T. +You can insert a snippet into the code editor by either clicking "Actions->Use Snippets" or pressing Ctrl+T. When choosing a snippet, you can enter the first few characters of the snippet name, and it will be auto-completed. @@ -142,16 +126,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/\_index.ru.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/\_index.ru.md) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/\_index.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/\_index.md) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit/\_index.ru.md#auto-complete-parentheses). +See [Code Edit/Auto Complete Parentheses](../code-edit/\_index.md#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit/\_index.ru.md#auto-remove-parentheses). +See [Code Edit/Auto Remove Parentheses](../code-edit/\_index.md#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/\_index.ru.md#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/\_index.md#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/setup/_index.ru.md b/content/docs/setup/_index.ru.md index d344a700b..072f1aeb0 100644 --- a/content/docs/setup/_index.ru.md +++ b/content/docs/setup/_index.ru.md @@ -9,19 +9,19 @@ description: Setup CP Editor to prepare for using it Now CP Editor is available in multiple languages, including English and Chinese. -You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/\_index.ru.md#ui-language). Note that you need to restart CP Editor to apply the change. +You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/\_index.md#ui-language). Note that you need to restart CP Editor to apply the change. ## Set Compile and Run Commands You need to install `g++` / `python` / `java` depending on which language you are using. You need to add them to system PATH to have them found by CP Editor. -Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language/\_index.ru.md#c-commands). +Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages](../preferences/language/\_index.md#commands). ## Setup CF Tool To submit Codeforces problems in CP Editor, you need to install [CF Tool](https://github.com/xalanq/cf-tool). -You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/\_index.ru.md#cf-tool). +You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/\_index.md#cf-tool). You need to configure the tool by running the command `cf config` in the command line before using it. @@ -40,19 +40,19 @@ You can install it from the addon/extension markets: CP Editor uses [Clang Format](http://releases.llvm.org/download.html) to format your C/C++ and Java code. -You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions/\_index.ru.md#clang-format). +You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#clang-format). ### Setup YAPF CP Editor uses [YAPF](https://github.com/google/yapf) to format your Python code. -It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting->YAPF](../preferences/extensions/\_index.ru.md#yapf). +It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#yapf). ## Setup Language Server You can use [Language Server](https://microsoft.github.io/language-server-protocol/) to lint your codes and get errors, warnings, etc. -You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/\_index.ru.md#language-server). +You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/\_index.md#language-server). Though you can use any language server program you like, here are some suggestions if you are not sure which to use. From 6b37ed0750cb81ded3a6b32067ceaadf5e4c5516 Mon Sep 17 00:00:00 2001 From: nekosu Date: Thu, 1 Jul 2021 22:55:43 +0800 Subject: [PATCH 5/5] fix wrong copying --- content/docs/preferences/extensions/_index.ru.md | 10 +++++----- content/docs/preferences/language/_index.ru.md | 14 +++++++------- content/docs/setup/_index.ru.md | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/content/docs/preferences/extensions/_index.ru.md b/content/docs/preferences/extensions/_index.ru.md index 787a1e519..18e86d35c 100644 --- a/content/docs/preferences/extensions/_index.ru.md +++ b/content/docs/preferences/extensions/_index.ru.md @@ -9,13 +9,13 @@ weight: 50 Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -**See also** [Setup Clang Format](../../setup/\_index.md#setup-clang-format). +**See also** [Setup Clang Format](../../setup/\_index.ru.md#setup-clang-format). ### YAPF YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only these lines will be formatted. -**See also** [Setup YAPF](../../setup/\_index.md#setup-yapf). +**See also** [Setup YAPF](../../setup/\_index.ru.md#setup-yapf). #### Program @@ -48,7 +48,7 @@ The content here is the same as the content of a `.clang-format` file(Clang Form ## Language Server -**See also** [Setup Language Server](../../setup/\_index.md#setup-language-server). +**See also** [Setup Language Server](../../setup/\_index.ru.md#setup-language-server). ### Use Linting with Language Server @@ -72,7 +72,7 @@ For example, if you are using `pyls` for Python, you probably want to use `pytho ## Competitive Companion -**See also** [Setup Competitive Companion](../../setup/\_index.md#setup-competitive-companion). +**See also** [Setup Competitive Companion](../../setup/\_index.ru.md#setup-competitive-companion). ### Open New Tabs @@ -112,7 +112,7 @@ You can use [CF Tool](https://github.com/xalanq/cf-tool/) to submit your solutio To submit a solution, you have to either parse a problem by [Competitive Companion](#competitive-companion) from Codeforces or manually set the problem URL of a tab in the context menu of it. -**See also** [Setup CF Tool](../../setup/\_index.md#setup-cf-tool). +**See also** [Setup CF Tool](../../setup/\_index.ru.md#setup-cf-tool). ### Path diff --git a/content/docs/preferences/language/_index.ru.md b/content/docs/preferences/language/_index.ru.md index 9a351154c..8fcb1145a 100644 --- a/content/docs/preferences/language/_index.ru.md +++ b/content/docs/preferences/language/_index.ru.md @@ -39,13 +39,13 @@ It could be useful if you are using locales for your compiler and the compiler m - Java: The path to save the class files. -If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.md#temporary-directory)). +If this path is relative, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/\_index.ru.md#temporary-directory)). You can use some place holders for this setting: - `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. - `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.md#temporary-directory). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/\_index.ru.md#temporary-directory). For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. @@ -87,7 +87,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general/\_index.md#regular-expression) +1. [Regex](../general/\_index.ru.md#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -126,16 +126,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/\_index.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/\_index.md) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/\_index.ru.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/\_index.ru.md) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit/\_index.md#auto-complete-parentheses). +See [Code Edit/Auto Complete Parentheses](../code-edit/\_index.ru.md#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit/\_index.md#auto-remove-parentheses). +See [Code Edit/Auto Remove Parentheses](../code-edit/\_index.ru.md#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/\_index.md#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/\_index.ru.md#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/setup/_index.ru.md b/content/docs/setup/_index.ru.md index 072f1aeb0..b4df23872 100644 --- a/content/docs/setup/_index.ru.md +++ b/content/docs/setup/_index.ru.md @@ -9,19 +9,19 @@ description: Setup CP Editor to prepare for using it Now CP Editor is available in multiple languages, including English and Chinese. -You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/\_index.md#ui-language). Note that you need to restart CP Editor to apply the change. +You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/\_index.ru.md#ui-language). Note that you need to restart CP Editor to apply the change. ## Set Compile and Run Commands You need to install `g++` / `python` / `java` depending on which language you are using. You need to add them to system PATH to have them found by CP Editor. -Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages](../preferences/language/\_index.md#commands). +Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages](../preferences/language/\_index.ru.md#commands). ## Setup CF Tool To submit Codeforces problems in CP Editor, you need to install [CF Tool](https://github.com/xalanq/cf-tool). -You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/\_index.md#cf-tool). +You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/\_index.ru.md#cf-tool). You need to configure the tool by running the command `cf config` in the command line before using it. @@ -40,19 +40,19 @@ You can install it from the addon/extension markets: CP Editor uses [Clang Format](http://releases.llvm.org/download.html) to format your C/C++ and Java code. -You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#clang-format). +You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.ru.md#clang-format). ### Setup YAPF CP Editor uses [YAPF](https://github.com/google/yapf) to format your Python code. -It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.md#yapf). +It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting](../preferences/extensions/\_index.ru.md#yapf). ## Setup Language Server You can use [Language Server](https://microsoft.github.io/language-server-protocol/) to lint your codes and get errors, warnings, etc. -You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/\_index.md#language-server). +You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/\_index.ru.md#language-server). Though you can use any language server program you like, here are some suggestions if you are not sure which to use.