How to setup Sublime Text for Competitive Programming?

How to setup Sublime Text for Competitive Programming?

take U forward

4 года назад

196,242 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Gunjan Biswas
Gunjan Biswas - 22.04.2020 22:37

i was facing a problem while setting up the sublime text in my laptop , i had preinstalled mingw in my machine so i used the following code to execute the c++ code in sublime text . This channel is great . thank you Raj bhaiya.


{
"cmd": ["gcc", "${file}", "-o", "${file_base_name}.exe"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,

"variants":
[
{
"name": "Run",
"cmd": ["start", "cmd", "/k", "${file_path}/${file_base_name}.exe"],
"shell": true
}
]
}

Ответить
Laksh Singhania
Laksh Singhania - 03.09.2023 00:05

bhaiya where do we have to locate the bits folder in windows ? pls help

Ответить
Amimul Tamim
Amimul Tamim - 23.07.2023 10:44

Thank you so much!

Ответить
Ashhar
Ashhar - 20.06.2023 14:23

I would say this is the best and simplest tutorial ever!!!!

Ответить
ANH STANISLAWSKI
ANH STANISLAWSKI - 17.06.2023 16:59

why my sublime does not read the input file, can smbody help pls

Ответить
Vaithiyanathan . T
Vaithiyanathan . T - 16.04.2023 07:12

please any one guide me to do this in windows

Ответить
Sakib Hasan
Sakib Hasan - 30.03.2023 23:52

Thanks <3

Ответить
Mahedi Rony
Mahedi Rony - 07.03.2023 18:00

The default key bindings for this plugin:
For AStyle formattor


Windows, Linux:

Ctrl+Alt+F: Format current file.
Ctrl+K, Ctrl+F: Format current selection.

OSX:

Ctrl+Alt+F: Format current file.
⌘+K, ⌘+F: Format current selection.

Ответить
Guru Prasad Shukla
Guru Prasad Shukla - 23.02.2023 21:07

sir output ni aa ra side me

Ответить
Ayush Kumar
Ayush Kumar - 13.11.2022 18:51

Hey, Guys!
If you are facing difficulty in finding the" include" folder inside /usr/bin

Then first u must install Xcode in your Mac , and in your terminal ,just write " gcc --version "
Then you will get the path of "include" folder inside /usr/bin/include, where you can create the new folder named as stdc++.

Hope it helps!🙂🙃

Ответить
Skullcrushers
Skullcrushers - 24.09.2022 09:15

sir my code is not getiing executed with ifndef ONLINE Judeg however its working with ifdef Online_Judge , what should do to change this unsual behaviour.

Ответить
Abhishek Jain
Abhishek Jain - 19.09.2022 22:25

my input file is not taking input (macOS)
please help

Ответить
Arunachalam M
Arunachalam M - 18.09.2022 21:15

man, whenever im stuck, you have an amazing video for it striver
thanks a lot

Ответить
Sasi Vardhan
Sasi Vardhan - 14.05.2022 23:12

I have set my path correct but its showing this error unable to figure it out.
[WinError 2] The system cannot find the file specified
[cmd: ['bash', '-c', "g++ -std=c++14 'D:\\code\\1.cpp' -o 'D:\\code/1' && 'D:\\code/1'"]]
[dir: D:\code]
[path: C:\WINDOWS;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;D:\MinGW\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program Files (x86)\Amazon Corretto\jdk11.0.13_8\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\OpenSSH\;C:\Users\HP\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\HP\AppData\Local\Programs\Python\Python310\;C:\Users\HP\AppData\Local\Microsoft\WindowsApps;D:\Program Files (x86)\;C:\Users\HP\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Amazon Corretto\jdk11.0.13_8\bin;D:\MinGW\bin;]
[Finished]

Ответить
ARYAN SIROHI
ARYAN SIROHI - 24.04.2022 18:54

permission denied collect2.exe error
please solve this 🥺

Ответить
Sanam yadav
Sanam yadav - 02.04.2022 19:23

its literally very difficult to understand wtevr you say. you are not at all clear man

Ответить
Rishabh Kumar
Rishabh Kumar - 17.03.2022 21:23

nice!!

Ответить
wille
wille - 28.01.2022 12:00

I installed sublime text 3 but day after using it consumes a lot of battery on my mac .Battery drowns way much faster then expected. I close the app & in battery section it shows sublime is using significant battery ,could any help plz @take U forward .

Ответить
SHIVAM
SHIVAM - 24.01.2022 07:39

Please do this for Java

Ответить
Rana Alok
Rana Alok - 16.01.2022 14:12

Is the setup of sublime text is same for kali Linux. Please help in setting my sublime text in Kali Linux

Ответить
shivam chaturvedi
shivam chaturvedi - 11.01.2022 17:41

what to do my output does not change

Ответить
Gilfoyle Gilfoyle
Gilfoyle Gilfoyle - 10.01.2022 18:43

It is taking 1.7 second for even the smallest programs, how to make it faster?

Ответить
Rajender Passi
Rajender Passi - 01.01.2022 10:18

how to precompile header file in ubuntu?
any help would be really appreciated.....

Ответить
akash kr roy
akash kr roy - 23.12.2021 19:19

/usr/local/include is not working for me. local file is opening but its showing empty.

Ответить
singh sahab
singh sahab - 16.09.2021 06:06

I'm getting this in my mac-

-ld: file too small (length=18) file '/Users/codeee/Documents/input1.txt' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[Finished in 1.1s with exit code 1]
[cmd: ['bash', '-c', "g++ -std=c++14 -Wall '/Users/codeee/Documents/input1.txt' -o '/Users/codeee/Documents/input1' && '/Users/himanshu/Documents/input1'"]]
[dir: /Users/codeee/Documents]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

Ответить
Amit Kumar Yadav
Amit Kumar Yadav - 07.09.2021 08:14

Sir that 1st file u saved I am getting saved in dev like when I am opening it it opens in dev not in sublime

Ответить
Akash jaiswal
Akash jaiswal - 27.08.2021 11:28

my code is not running on sublime text, it just do nothing on pressing ctrl+B

Ответить
Prasenjit Dutta
Prasenjit Dutta - 14.08.2021 12:01

error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun i am getting this error please help

Ответить
Ziaul Hoque
Ziaul Hoque - 09.08.2021 13:09

please add something about how to save code or snippet easily

Ответить
Saurabh Mishra
Saurabh Mishra - 30.07.2021 00:55

Hey, I use MacBook Air M1, the path you give didn't work in my laptop. I didn't reach to include folder. Please help me to include bits/stdc++.h file

Ответить
Raushan Kumar Gupta
Raushan Kumar Gupta - 29.07.2021 13:44

Can anyone please help me with this error ?

[WinError 2] The system cannot find the file specified
[cmd: ['bash', '-c', "g++ -std=c++14 -Wall 'C:\\Users\\raush\\AppData\\Roaming\\Sublime Text\\Packages\\User\\Sublime Code\\e.cpp' -o 'C:\\Users\\raush\\AppData\\Roaming\\Sublime Text\\Packages\\User\\Sublime Code/e' && 'C:\\Users\\raush\\AppData\\Roaming\\Sublime Text\\Packages\\User\\Sublime Code/e'"]]
[dir: C:\Users\raush\AppData\Roaming\Sublime Text\Packages\User\Sublime Code]
[path: C:\Program Files\AdoptOpenJDK\jdk-11.0.11.9-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\TDM-GCC-64\bin;C:\Users\raush\AppData\Local\Microsoft\WindowsApps;C:\Users\raush\AppData\Local\Programs\Microsoft VS Code\bin]
[Finished]

Ответить
333 vaishali cute
333 vaishali cute - 09.07.2021 08:41

Meri shadi mere pyar shivam dubey se ho gyi mai unke sath bahot khush hu

Ответить
ADITYA MONU
ADITYA MONU - 12.06.2021 12:07

Thanks a lot

Ответить
Mirza Zaid Beg
Mirza Zaid Beg - 11.06.2021 09:32

I have installed gcc(version 11.1.0) but while running it is showing error --
g++-9 : command not found
Can somebody plz help me out.

Ответить
Aviral
Aviral - 30.05.2021 08:05

Can someone pls help me ,auto keyword is not working ,I exactly followed what bhaiya did .I am using windows 10

Ответить
santosh reddy
santosh reddy - 23.05.2021 17:28

bro please explain how to do this for java.pleeaaase reply

Ответить
bt2O1O4135 Prakhar Tomar
bt2O1O4135 Prakhar Tomar - 19.05.2021 17:46

Will the build command work for Ubuntu 20.04

Ответить
VISHAL HAMPIHOLI
VISHAL HAMPIHOLI - 07.05.2021 12:16

Thanks bro .......finally after struggling for couple of hours done....

Ответить
Yash Singh
Yash Singh - 24.04.2021 21:25

@take U forward
For all those C++14 lovers who need better functionality than C++11(default) like the use of auto, condensed for loops, etc.
I struggled a lot to get this configuration.
Hope it will you a lot.
Requirements: OS - WINDOWS, Already installed MingW compiler.
Script:

{
"shell_cmd": "g++ -std=c++14 \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",

"variants":
[
{
"name": "Run",
"shell_cmd": "g++ -std=c++14 \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
}
]
}

Ответить
MOHIT RANA
MOHIT RANA - 05.04.2021 15:40

acess is denied

Ответить
Utkarsh Sharma
Utkarsh Sharma - 03.04.2021 20:20

{
"shell_cmd": "g++ -std=c++14 \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c++.14",

"variants":
[
{
"name": "Run",
"shell_cmd": "g++ -std=c++14 \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
}
]
}

Ответить
Utkarsh Sharma
Utkarsh Sharma - 03.04.2021 20:03

I am stuck at this since half an hour.
I'm now giving up with Sublime text.

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\utkarsh sharma\AppData\Roaming\Sublime Text 3\Packages\User/main.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
[Finished in 3.8s]

Ответить
Karna Ghose
Karna Ghose - 29.03.2021 21:05

Bhaiya, I've gone through the whole process that you've shown. But still the text fails to build and displays the following error:
"error: non-ASCII characters are not allowed outside of literals and identifiers"
What can I do to fix this? Plz reply

Ответить
Anirudh Shrikanth
Anirudh Shrikanth - 29.03.2021 06:21

Thanks a lot!

Ответить
Aquib Ansari
Aquib Ansari - 24.03.2021 19:14

Just Use CLion Bros

Ответить
Aditya Gupta
Aditya Gupta - 23.03.2021 15:21

run time error is not showing

Ответить
Aniruddha Shende
Aniruddha Shende - 07.03.2021 14:44

This doesn't work

Ответить