![]() If you would like to revert back to original g , just go back to C Single file build and change "/opt/homebrew/bin/g -11" to "g " wherever applicable. Compile and build as you would usually do in sublime text (cmd b/cmd shift b) and this time it would build using brew's g . Save this file using cmd s and restart sublime text. After that open command palette and open "PackageResourceViewer: Open resource".įinally replace all g with the location we copied earlier (/opt/homebrew/bin/g -11). Open sublime text and install "PackageResourceViewer" from Package Control. Copy this location ( Mine was something like - /opt/homebrew/bin/g -11 ). Now type the command "which g -11" to get the location where g -11 got installed. So I tried searching how to use brew's g as default build in Sublime Text without breaking anything but couldn't find anything.Īfter that install gcc using the command in terminal "brew install gcc".Ĭheck if install is complete using command "gcc-11 -version" (I got gcc-11 installed, in future you may use gcc-12,gcc-13 etc). If you are used to install software through script, this manipulation is probably trivial for you.There are many things that I find missing in default C build in Mac Sublime Text(clang) like no bits/stdc .h header, regular warnings on using auto keyword, using inline comparator functions etc. To make sure of it, you can run the command subl -v to display your version of the command line installed ? Conclusion Now close your opened terminal and reopen them, or simply run the command source ~./bash_profile, and you will be able to run the command subl. If you haven’t installed Sublime Text in you Applications folder, change the path accordingly to the location where you put it, and tell me why you did so in the comments, I am curious ? bash_profile, you may prefer put this line at the end of the file): export PATH=$PATH:/Applications/Sublime\ Text.app/Contents/SharedSupport/bin Once this file open, add the following line wherever you want (if you have a complex. If the file doesn’t exist, it is okay, we can create an empty one where we will add our instruction. To to so, you can type the command open ~/.bash_profile, for example. bash_profile which is normally in you HOME folder. So now, let’s focus on the main goal, being able to call the command subl from your terminal. If this is not already the case for you, then, follow this link, download and install it on your computer.Īt this point, you should be able to open Sublime Text without the terminal ? The first step to have the command subl accessible is to install Sublime Text, obviously. You can also add the option -n to open it in a new windows, or the option -h to display the help and have all the description of all the possibilities available to you. It is essentially a free version of the popular TextWrangler text editor, which got discontinued a few. Once setup up, you can use command line like subl my_file_or_folder to open a file or a folder in Sublime Text. BBEdit BBEdit is a Mac-only text editor from Bare Bones Software. The command sublįor those who don’t know, Sublime Text has a shortcut, a command line tool named subl, which allow you to use summon sublime text though your terminal. ![]() Last week, I had to reinstall all the tools I use on a new computer, since the previous one passed away ☠️Īnd since I use Sublime Text as a default text editor, (please, no debate over which text editor is the best in the comment ?), I had to reinstall it and make it easily accessible through the terminal.
0 Comments
Leave a Reply. |