Open itsameaditya opened 3 years ago
Also just for confirmation I have manually compiled the code above and it gave the correct answer.
Thanks for bringing this up!. I am aware of this issue but I haven't had the time to investigate how windows CMD works, apparently it does something weird with spaces and line-endings, it is just weird.
For now, I recommend you to use WSL (Windows Subsystem for Linux) it works perfectly with cpbooster
.
Can you tell me a way so that cpbooster does not check trailing or leading blank spaces and also to disable the TLE function .. It seems to have a few bugs..
Can you tell me a way so that cpbooster does not check trailing or leading blank spaces and also to disable the TLE function .. It seems to have a few bugs..
This bugs just appear when using windows CMD right ?
I use the CMD to run "cpb clone" and then compile it using inbuilt neovim terminal
Currently there is no way to disable the "leading or trailing whitespaces" check. For the TLE you can modify the default value by adding the line time-limit: 99999999
this will tell cpbooster
to consider a huge time limit or basically non-existent time-limit
Take a look a this for better undertanding on how time-limit
works: https://searleser97.github.io/cpbooster/docs/test#time-limit-exceeded
I use the CMD to run "cpb clone" and then compile it using inbuilt neovim terminal
yeah, so, if you run neovim inside CMD then Neovim will use CMD as well for its built-in terminal.
The inmediate solution is to use WSL in Windows instead of regular CMD. I suggest WSL with Ubuntu, since it will make it easier to install the packages.
Can you please tell me how to do that.. I am not really good with OS stuff..
I use the CMD to run "cpb clone" and then compile it using inbuilt neovim terminal
yeah, so, if you run neovim inside CMD then Neovim will use CMD as well for its built-in terminal.
The inmediate solution is to use WSL in Windows instead of regular CMD. I suggest WSL with Ubuntu, since it will make it easier to install the packages.
Can you please tell me how to do that.. I am not really good with OS stuff..
There is a pretty nice tutorial from the oficial microsoft website here: https://docs.microsoft.com/en-us/windows/wsl/install-win10
preferably install WSL V2 as well, as suggested in that link
In cmd i just used to type "cpb clone", how do I do the same thing in the WSL thing?
Do I have to reinstall cpbooster from scratch...
it works the same way in Linux (WSL) you just run cpb clone
or cpb (whatever command)
However, since you are now in WSL (a different operative system inside Windows) you do have to install cpbooster
again there.
You must install NodeJs
and then do same as before, Just run npm install cpbooster -g
and you will be ready to go.
I recommend using nvm
to install NodeJs
https://github.com/nvm-sh/nvm#installing-and-updating
it is as easy as just running some simple commands;
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install node
(probably you will need to restart your WSL terminal before running this command)npm install cpbooster -g
Does that mean i have to reinstall Neovim too right?
Does that mean i have to reinstall Neovim too right?
right, you can run this commands to get it installed:
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim
its too complex dude... i have to rewrite my init.vim .... too much work to do...
Also do you know any other plugin which is similar to cpbooster .. (for windows) i really loved this idea ..... Now I wish... I had Linux
I recommend to backup your init.vim
in a repository like github, so that you can just git clone
it in any machine. In Linux you must locate this file in /home/USERNAME/.config/nvim/init.vim
. For example: https://github.com/searleser97/nvim
It will only be an issue if you have some mappings or plugins that just work on Windows, but I doubt that you have something like that, most vim/neovim plugins were made thinking in linux first.
About other tools similar to cpbooster
, I know some, but installation steps are more painful even in Linux, also not sure if any of them work for Windows, all of them have instructions for linux. I think it is because Windows requires to write more specific code to the platform, which makes it more complicated. Anyways, some of them are: cf-tool
, oj
(I don't remember more) (notice this tools do not have a plugin for vim/neovim. you could create it though)
Also, if you like to contribute fixing cpbooster
for Windows, I'll appreciate it pretty much, otherwise, probably I will return to this in 3 or 4 months.
Also, if you like to contribute fixing
cpbooster
for Windows, I'll appreciate it pretty much, otherwise, probably I will return to this in 3 or 4 months.
I would love to but I am not as good as you.. but i will surely give it a shot
I recommend to backup your
init.vim
in a repository like github, so that you can justgit clone
it in any machine. In Linux you must locate this file in/home/USERNAME/.config/nvim/init.vim
. For example: https://github.com/searleser97/nvimIt will only be an issue if you have some mappings or plugins that just work on Windows, but I doubt that you have something like that, most vim/neovim plugins were made thinking in linux first.
About other tools similar to
cpbooster
, I know some, but installation steps are more painful even in Linux, also not sure if any of them work for Windows, all of them have instructions for linux. I think it is because Windows requires to write more specific code to the platform, which makes it more complicated. Anyways, some of them are:cf-tool
,oj
(I don't remember more) (notice this tools do not have a plugin for vim/neovim. you could create it though)
What is oj? I cant find it anywhere..
Also I have reached till this step and cofigured neovim and all .. but the cpbooster "template" shows some error in WSL :
I know there is some mistake in the path for template.cpp file which I have specified. Please help me figure this out
assumming you don't have any typo in your path, then the only issue I can think of is that probably you created the directory or file with some elevated permissions such as root
permissions
Glad you got it working in WSL 🙂
FYI, I deleted the latest comments since they describe a different issue and were better summarized on issue: #11
I am a Windows user and really liked the concept of cpbooster but here is one issue I am facing..... So I parsed a problem from codeforces and all the test cases were downloaded properly .... I then the correct solution to the problem , but the cpbooster plugin says "Wrong Answer"
The answer cannot be wrong because it is an accepted and copy pasted code from codeforces hence there is some issue with the plugin . Here is a screenshot of the verdict: