This is my setup for the CP-Editor tool.
This is an almost optimal command for compiling C++ code with speed in mind:
g++ -std=c++17 -Wall -Wshadow -O2 -o "%e"-std=c++17: Specifies the C++ standard version.-Wall: Enables most of the commonly used warning messages.-Wshadow: Warns about variable shadowing.-O3: The highest level of optimization focusing on performance, which can make the compiled program faster. It performs more aggressive optimizations compared to-O2.-o "%e": Specifies the output filename (%eis typically replaced by the output filename in some IDEs or build systems).
Set the path to the clang-format executable, or simply use clang-format if it’s in the PATH environment variable.
download clang-fomat file here .clang-formate
D:/CP/clang-format/clang-format.exe
Specify the arguments passed to clang-format. It should NOT contain -i (the in-place modification option).
To link the .clang-format file that you created on your local machine in the "Clang Format Arguments" section, you can specify the path to your .clang-format file using the -style flag. Here's how you can do it:
-
Locate the
.clang-formatfile on your local machine. Note the full path to this file. -
In the "Clang Format Arguments" field, enter the following argument:
-style=fileBy using
-style=file, ClangFormat will automatically search for the.clang-formatfile in the directory of the file you're formatting or in one of its parent directories. -
If your
.clang-formatfile is in a specific location and you want to specify the path directly, you can do:-style=file:/path/to/.clang-formatReplace
/path/to/.clang-formatwith the actual path to your.clang-formatfile.Example:
-style=file:D:/CP/clang-format/.clang-format
After doing this, ClangFormat will use the configuration specified in your .clang-format file for formatting.
Competitive Companion is used to parse problems/contests from online judges. After you install it, you can parse sample test cases with a single click, instead of copying them manually.
You can install it from the addon/extension markets:
To submit Codeforces and other competitive programming platform problems in CP Editor, you need to install CF Tool.
You can use CF Tool to submit your solutions to Codeforces and other competitive programming platforms.
To submit a solution, you have to either parse a problem by Competitive Companion from Codeforces or manually set the problem URL of a tab in the context menu of it.
See also Setup CF Tool.
Set the path to the cf executable file, or simply use cf if it’s in the PATH environment variable.
For example:
D:/CP/cf-tool/cf.exe
You can use WakaTime to track your time usage.
If you are a Linux/macOS user and your distro provides the WakaTime CLI, it’s recommended to use it.
Otherwise, there are two options:
- The deprecated Python version. You can install it via
pip install wakatime. - The new Go version. You can download it at https://github.com/wakatime/wakatime-cli/releases.
Go to WakaTime for Windows.
The Windows desktop app can track the time you spend in any app. It’s a catch-all if we don’t have a plugin for your IDE or app.
- Download WakaTime for Windows.
- Run it.
- If prompted, enter your API Key then click
Save. - Use your computer like normal, and your coding activity will be displayed on your WakaTime Dashboard.