GithubHelp home page GithubHelp logo

cpbooster.vim's Introduction

cpbooster โค๏ธ vim

About

cpbooster plugin for vim or neovim

video-demo-min

Installation

npm install cpbooster -g
  • Install cpbooster.vim using your preferred plugin manager

Plug 'searleser97/cpbooster.vim'

Commands

Command Description
:Test [id] Test your current code against all available testcases for it,
or just one testcase if [id] is set.
:Debug [id] Run your current code with your debugging flags,
or run it against one testcase if [id] is set.
:Create <filename> Create source file loading the corresponding
template for the file extension.
:Rtest [id] Test the last compiled version of your code.
Same as :Test but without recompiling.
:Rdebug [id] Debug the last compiled version of your code.
Sames as :Debug but without recompiling.
:Addtc Add new test case for your current code.
:Submit Submit your code to an Online Judge. (Codeforces, AtCoder, ...)

Future Updates

  • Add :TestAs <filename> command
  • Add :DebugAs <filename> command

License

cpbooster.vim is licensed under the GNU General Public License v3.0

cpbooster.vim's People

Contributors

searleser97 avatar user202729 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cpbooster.vim's Issues

Open tabs/buffers when adding new testcase

When using :Addtc I think it should be more comfortable editing the input and expected output in vim mode
So, maybe when using the command, the plugin should create two new buffers
For example in B.problemname.cpp
Opens:

  • B.problemname.in2
  • B.problemname.ans2
    and edit them with vim/neovim, then just save the two buffers.

Does cpbooster support brave for submitting problems?? (also, some NodeJs installation issues)

I have'nt installed chromium.
I tried to cpb login codeforces, it is giving me following errors

node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

browserType.launch: Failed to launch chromium because executable doesn't exist at /home/irfan/.cache/ms-playwright/chromium-857950/chrome-linux/chrome
Try re-installing playwright with "npm install playwright"
Error
    at Object.captureStackTrace (/usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/utils/stackTrace.js:48:19)
    at Connection.sendMessageToServer (/usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/client/connection.js:69:48)
    at Proxy.<anonymous> (/usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/client/channelOwner.js:64:61)
    at /usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/client/browserType.js:64:67
    at BrowserType._wrapApiCall (/usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/client/channelOwner.js:77:34)
    at BrowserType.launch (/usr/lib/node_modules/cpbooster/node_modules/playwright-chromium/lib/client/browserType.js:55:21)
    at Codeforces.<anonymous> (/usr/lib/node_modules/cpbooster/dist/Submit/OnlineJudgeFactory/OnlineJudge.js:224:81)
    at step (/usr/lib/node_modules/cpbooster/dist/Submit/OnlineJudgeFactory/OnlineJudge.js:69:23)
    at Object.next (/usr/lib/node_modules/cpbooster/dist/Submit/OnlineJudgeFactory/OnlineJudge.js:50:53)
    at /usr/lib/node_modules/cpbooster/dist/Submit/OnlineJudgeFactory/OnlineJudge.js:44:71

No problem if it doesn't support ๐Ÿ˜ƒ Thank you so much , this extension saved me a lot of time

error testing

I currently using win11, gvim 8.2, installed npm to clone and also had plugin, and when command :Test i have this issue:

Error detected while processing function cpbooster#CpboosterTest:
line 5:
CreateProcess failed

Screenshot 2022-04-03 201953

Use :up instead of :w?

There are many instances in the code where :w is used.

It may be better to change it to :up so another write is unnecessary (unless you explicitly want to show the status line.)

Submit not working

submitting...
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise
*/);
            ^

browserType.launch: Executable doesn't exist at /home/prabhaka
r/.cache/ms-playwright/chromium-1000/chrome-linux/chrome
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Looks like Playwright Test or Playwright was just installed
or updated. โ•‘
โ•‘ Please run the following command to download new browsers:
            โ•‘
โ•‘
            โ•‘
โ•‘     npx playwright install
            โ•‘
โ•‘
            โ•‘
โ•‘ <3 Playwright Team
            โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
    at Codeforces.<anonymous> (/usr/lib/node_modules/cpbooster
/dist/src/Submit/OnlineJudgeFactory/OnlineJudge.js:300:81)
    at step (/usr/lib/node_modules/cpbooster/dist/src/Submit/O
nlineJudgeFactory/OnlineJudge.js:69:23)
    at Object.next (/usr/lib/node_modules/cpbooster/dist/src/S
ubmit/OnlineJudgeFactory/OnlineJudge.js:50:53)
    at /usr/lib/node_modules/cpbooster/dist/src/Submit/OnlineJ
udgeFactory/OnlineJudge.js:44:71
    at __awaiter (/usr/lib/node_modules/cpbooster/dist/src/Sub
mit/OnlineJudgeFactory/OnlineJudge.js:40:12)
    at Codeforces.OnlineJudge.submit (/usr/lib/node_modules/cp
booster/dist/src/Submit/OnlineJudgeFactory/OnlineJudge.js:295:
16)
    at Object.submit (/usr/lib/node_modules/cpbooster/dist/src
/Submit/Submit.js:78:8)
    at Object.handler (/usr/lib/node_modules/cpbooster/dist/sr
c/index.js:187:38)
    at Object.runCommand (/usr/lib/node_modules/cpbooster/node
_modules/yargs/build/lib/command.js:196:48)
    at Object.parseArgs [as _parseArgs] (/usr/lib/node_modules
/cpbooster/node_modules/yargs/build/lib/yargs.js:1043:55)
    at Object.get [as argv] (/usr/lib/node_modules/cpbooster/n
ode_modules/yargs/build/lib/yargs.js:986:25)
    at Object.<anonymous> (/usr/lib/node_modules/cpbooster/dis
t/src/index.js:214:3) {
  name: 'Error'
}

Node.js v17.9.0

[Process exited 1]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.