how to run terminal in sublime text code example

Example 1: how to open terminal in sublime text ubuntu

# 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.

Example 2: open sublime text using terminal

//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 .

Example 3: run cmd through sublime

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)

Example 4: sublime text 3 terminal

// Sublime Text 3 - osx

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/.

Tags:

C Example