Блог пользователя _joKer_0

Автор _joKer_0, 2 года назад, По-английски

If you are on CF for quite a while, you must've heard about a tool, CF-Tool — made by xalanq.

You can know all about it here.

So, If you are a fan of VIM, this is for you. But for people like me, who like to code on VScode because of its visual appearance, and because of the fact that an awesome extension CPH Judge made by d-agrawal exists.

You can know all about it here.

With the help of Competitive Companion, you can parse the problems easily, making only the function cf-submit(for submitting) and cf-sid(for viewing last submission) useful. This makes submission a lot more convenient.

Here's how you can do it:

If you are using Linux, or wsl, the process will be a lot easy.

Here's how you can do it on Linux or WSL:

  1. Install CF-tool from the precompiled binary file or firstly install "go" in linux and then compile it from the source. All the info about how to install is here. If you compile the file, then it would be feasible for you to add new languages, as the current version doesn't support newer languages such as C++17 64bit and C++20 64bit.

  2. Configure the CF-Tools by adding your login info and adding a template (It's important for submitting).

  3. After adding CF-tools to the environmental variable, you'll need to integrate it to vscode (assuming you are already using CPH), for that, you have to go inside the ".vscode" folder in your current directory(where you do CP) and you'll have to make a file tasks.json, if it doesn't exists already.

Now, you'll have to add these two tasks:

Refer to this file.

  1. Now that you have made the tasks, you'll now have to make key bindings, so that you can submit easily. I've chosen Ctrl+Alt+F to submit and Ctrl+Alt+J to view last submission because these two combinations were unallotted.

For this, you'll have to find a file keybindings.json to make your custom key bindings. You can use Ctrl+P to find the file, if you are unable to do so, then click on the settings icon and then go to "Keyboard Shortcuts". A whole set of key bindings will open. Now, on the top right corner(just below the window resize button) you'll get a file like Icon, on hovering, it'll say "Open Keyboard Shortcuts(JSON)", click there, and you'll get your keybindings.json file.

There, you'll have to add this:

Refer to this file.

And, that's it, if you've done everything correctly, then, on pressing Ctrl+Alt+F on your opened solution file, it'll submit automatically.

For Windows users:

All the steps are the same but, you'll need to install grep from here, as FINDSTR in windows was not that good, and you'll have to copy these two tasks:

Refer to this file.

And that's it.

Trust me, I've been using this for quite a while, and it is convenient and as well as satisfying to submit with just Ctrl+Alt+F. You've got to try this out once.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится