Codementor Events

How to setup Sublime for Competitive coding with C++?

Published Oct 01, 2020
How to setup Sublime for Competitive coding with C++?

When the aim is to be quick and efficient but the tools we use during awkwardly heavy and impede our speed. This post will help you set up Sublime Text in a way that leads to a good workflow -from reading to submitting a solution of a problem

Environment Set Up

1.Install MinGW Compiler
Download MinGW compiler from here
2.Install Sublime Text
Download and install latest Sublime Text from here
3.Create a build System
Goto the toolbar in Sublime text

Tools > Build System > New Build System

Paste Following code and save the file

{
"cmd": ["g++.exe","-std=c++17", "${file}", "-o", "${file_base_name}.exe", "&&" , "${file_base_name}.exe<inputf.in>outputf.in"],
"shell":true,
"working_dir":"$file_path",
"selector":"source.cpp"
}

4. Window Layout
Select from toolbar and follow the steps

Step 1. View > Layout > Column : 3
Step 2. View > Groups > Max Columns :2

Step 1
Step 1
Step 2
group.png

Final Outcome

Sublime Setup.png
open Input.txt and output.txt in vertical small coloumns.
Thanks!!
Hope you liked it.

Discover and read more posts from Jatin Bhardwaj
get started
post commentsBe the first to share your opinion
BogdanTemnik
2 years ago

and what should i do when i got an eternal loop?

Show more replies