Source directory creating script for competitive programmers who are using c++ and neovim
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Cpsrc is a tool to automate and enhance competitive programmer's experience. It works well with neovim and C++. You can also modify it to use the editor and programming language of your choice.
  2. Cpsrc offers several features:
  3. - Automatic template
  4. - Fast and easy compilation (using Makefile and precompiled headers)
  5. - Colored input/output
  6. # Installation
  7. Clone the repository and make setup.sh executable and run it:
  8. ```shell
  9. git clone https://git.rinri-d.xyz/rinri/cpsrc.git
  10. cd cpsrc
  11. chmod +x setup.sh
  12. ./setup.sh
  13. ```
  14. Write a template that will be used to create new .cpp files. Enter the number of the starting line.
  15. # Usage
  16. To create a new .cpp file, run create.sh with a filename as an argument:
  17. ```shell
  18. ./create.sh 1234a
  19. ```
  20. It will create 1234a.cpp and open neovim. Enter either 1234a.cpp or 1234a.
  21. To compile and run the file, use run.sh with the filename (or problem name, e.g., 1234a) as an argument:
  22. ```shell
  23. ./run.sh 1234a.cpp
  24. ```
  25. To compile extremely fast, precompile needed header files in the directory. To precompile bits/stdc++.h use `make`:
  26. ```shell
  27. make cpstd
  28. ```
  29. If it didn't work, you should do it manually by copying a header file in the directory and compiling it with the same flags used in the Makefile. Don't forget to use double quotes in your template. With double quotes, GCC uses a local header first.
  30. ```c++
  31. #include "bits/stdc++.h"
  32. // "" instead of <>
  33. ```