Code Monkey home page Code Monkey logo

run-app-sublime's Introduction

Run applications - Sublime Text

Run any customized application from command palette. Just Ctrl/Command+Shift+P, input Run: XXX, that's it!

effect

Installation Instructions

Package Installer

  • Install Sublime Package Control
  • Select "Package Control: Install Package" from the Command Palette (super/ctrl+shift+p)
  • Find "Run Apps" and select

Git clone

  • Enter directory through "Browse Packages..." in Sublime Text "Preferences"
  • Run
    git clone https://github.com/liuhewei/run-app-sublime.git
    

Usage

Firstly, add applications through: "Tools" -> "Run Apps" -> "Add Application".

Each application follows:

    {
        "caption": "Run: Git",  // Run: <App-name>, shown in command pallete
        "command": "runapp",    // cannot be changed
        "args":{
          // application full path on Win/Linux, or only name on MAC
          "app": "",

          // argument list
          // variables can be use: $DIR$, $FILE$, $PROJ$
          "args": [""],

          // optional: define what should follow the command
          // default is None
          // "dir" - file directory, same as $DIR$
          // "file" - file name, same as $FILE$
          // "proj" - project directory, same as $PROJ$
          "type": "",

          // optional: command line application or not
          // default is false
          "cli": true

          // optional: send in selected text as input or not
          // default is false
          "input": true
        }
    }

Take "Git bash on windows" as an example for GUI-app, the original command is:

C:/Windows/system32/wscript "D:/Tools/Git/Git Bash.vbs" <directory>

    {
        "caption": "Run: Git",
        "command": "runapp",
        "args":{
          "app": "C:\\Windows\\system32\\wscript",
          "args": ["D:\\Tools\\Git\\Git Bash.vbs"],
          "type": "proj"
        }
    }

Take "git status ." as an example for CLI-app, the original command is:

D:\Tools\Git\mingw64\bin\git.exe status . Under current file's directory.

{
    "caption": "Run: Git-status",
    "command": "runapp",
    "args":{
      "app": "D:\\Tools\\Git\\mingw64\\bin\\git.exe",
      "args": ["status", "."],
      "type": "dir",
      "cli": true
    }
}

Take "go doc " as an example for CLI-app with input, the original command is:

D:\Tools\Go\bin\go.exe doc fmt.Println Under selected text fmt.Println

{
    "caption": "Run: Godoc",
    "command": "runapp",
    "args":{
      "app": "D:\\Tools\\Go\\bin\\go.exe",
      "args": ["doc"],
      "input": true,
      "cli": true
    }
}

run-app-sublime's People

Contributors

liuhewei avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.