RinRi's blog

By RinRi, history, 3 years ago, In English

Cpsrc

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.

Cpsrc offers several features:

  • Automatic template

  • Fast and easy compilation process (using Makefile and precompiled headers)

  • Colored input/output

Initially, I developed it for personal usage. But you are free to use it and contribute as well. You can find installation and usage instructions in the repositories hosted on Gitea and GitHub.

Thanks to _Na2Th for the article about precompiled headers.

The structure of Cpsrc:

  • Makefile makes it easier to compile your source files. It doesn't compile a file if it didn't change. Also Makefile provides bits/stdc++.h precompiling.

  • setup.sh creates your template and the starting position of the cursor.

  • create.sh script creates a source file with a template.

  • run.sh compiles (if needed) and runs your code with colored input/output.

Links:

  • Vote: I like it
  • +11
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Thanks , it will be helpful for a lot of users.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It is nice to hear that it will be useful for someone.

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice work, kudos to you! Btw which platform is this your code on?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks! What do you mean? My code is hosted on both my personal Gitea instance and Github. The script itself works well on every GNU/Linux system (and probably MacOS). Forgot to mention the dependencies: - Any POSIX-compliant shell - GCC (g++) - Make - Neovim