This was my question as well a few days back; when I decided to start CP again. One thing I noticed was the abundance of articles and blogs for setting up code editors for CP using C++ as main language; it is completely natural given quick pace, macros and short syntax of C++. But, the lack of resources to set up code editors with python really bugged me. I too wanted to create the same cool looking CP window with partition; and here it is; a simple guide on this extremely simple yet rare setup. Here we go…
Step 1: Install Python
Windows: https://www.python.org/downloads/
Linux: https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-20-04-server
MacOS: https://docs.python-guide.org/starting/install3/osx/
Step 2: Install Sublime Text
Windows/ MacOS: https://www.sublimetext.com/download
Linux: https://computingforgeeks.com/install-sublime-text-on-ubuntu-debian/
Step 3: Install a good auto-complete engine
My choice for this is Tabnine, You can follow this to setup Tabnine for your sublime text in few easy steps.
https://www.tabnine.com/install/sublime
Step 4: From here, begins the most crucial part, i.e. looks, just kidding ;-)
before that, create three files as given below:
1. solution.py: The file for writing the code.
2. input.txt: The file where we will be giving the input.
3. output.txt: The file where the output will be displayed.
4. error.txt: The file where the error will be displayed.
Step 5: Changing the view : Open your sublime text, Now, perform the following steps:
- Select View > Layout > Columns : 3. This will create three columns in the workspace. Move the three files into three columns.
- Select View > Groups > Max Columns : 2.
Step 6: Opening all files that we created on each panel.
Simply move to the panel and press “Ctrl + O”, and select the files you want for each panel. After doing this the editor would look something like this:
I think in Step 5, Part 1, you should select columns as 4 instead of 3. :)