Skip to content

AmweCodex/CP-Editor-Configuration-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CP-Editor Configuration

This is my setup for the CP-Editor tool.


C++ Compiler Commands

This is an almost optimal command for compiling C++ code with speed in mind:

g++ -std=c++17 -Wall -Wshadow -O2 -o "%e"

Explanation of Flags

  • -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 (%e is typically replaced by the output filename in some IDEs or build systems).

Clang Format

Program

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

Arguments

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:

  1. Locate the .clang-format file on your local machine. Note the full path to this file.

  2. In the "Clang Format Arguments" field, enter the following argument:

    -style=file
    

    By using -style=file, ClangFormat will automatically search for the .clang-format file in the directory of the file you're formatting or in one of its parent directories.

  3. If your .clang-format file is in a specific location and you want to specify the path directly, you can do:

    -style=file:/path/to/.clang-format
    

    Replace /path/to/.clang-format with the actual path to your .clang-format file.

    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.

Setup Competitive Companion

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:

CF Tool

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.

Path

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

Setup WakaTime

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:

For Clarity

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.

Installing

  1. Download WakaTime for Windows.
  2. Run it.
  3. If prompted, enter your API Key then click Save.
  4. Use your computer like normal, and your coding activity will be displayed on your WakaTime Dashboard.

About

This is my set up for CP-Editor tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages