xxxxxxxxxx
Sublime has a file called subl and this what you want the systeme to use in order to run it from cmd
so in windows :
>go to files then to your c drive or wherever sublime is in
>go to programes then sublime
>copy that path from the files bar(mine is : C:\Program Files\Sublime Text)
>windows logo + x
>systeme
>advanced system parameters
>varibale envi
>on the system variables search for path varibale and double click it
>click new and paste the sublime path you copied and click ok
>go to your terminal and type subl
if u didn't understand follow this : https://www.youtube.com/watch?v=MlnH8t4S4Qw
xxxxxxxxxx
sudo ln -s /snap/sublime-text/38/opt/sublime_text/sublime_text /usr/local/bin/subl
xxxxxxxxxx
##go to preferences ->Package Setting ->Terminal ->System Deafult
-> clear and paste the below code and save it
{
"terminal": "cmd.exe",
"parameters": [],
"env": {}
}
xxxxxxxxxx
# how to open terminal in sublime text ubuntu
>> open sublime text 3 editor
>> Ctrl+Shift+P <-- it will open package manager
>> Type install package and Select it.
>> Type terminus
>> install it. once complete installation Ctrl+Shift+P and search for Terminus init then it will open terminal.
xxxxxxxxxx
//create new folder using terminal or open any existing
npx create-react-app newapp
//newapp is new folder. now open it
cd newapp
//now run following code
sublime .
//your folder will open in visual studio code. for sublime enter follwing code
code .
xxxxxxxxxx
import os, sublime_plugin
class CmdCommand(sublime_plugin.TextCommand):
def run(self, edit):
file_name=self.view.file_name()
path=file_name.split("\\")
current_driver=path[0]
path.pop()
current_directory="\\".join(path)
command= "cd "+current_directory+" & "+current_driver+" & start cmd"
os.system(command)
xxxxxxxxxx
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl .