Giter Site home page Giter Site logo

brackets-command-line-shortcuts's Introduction

Command Line Shortcuts for Brackets

Brackets IDE plugin. Adds support of shortcuts for execution of terminal commands right from the IDE.

Configure Shortcuts

Find the configuration under command-line-shortcuts.commands in your preferences file.

Example configuration

[
  {
    "name": "Build whole project",
    "cmd": "grunt",
    "shortcut": "Ctrl-Shift-B",
    "autohide": true
  },
  {
    "name": "Run unit tests",
    "dir": "$PROJECT_ROOT",
    "cmd": "grunt test",
    "shortcut": "Ctrl-Alt-B",
    "autohide": true
  },
  {
    "name": "Update the source",
    "dir": "$PROJECT_ROOT",
    "cmd": "git pull",
    "shortcut": "Ctrl-Shift-P",
    "autohide": true
  },
  {
    "name": "Display contents of the currently selected file",
    "dir": "$SELECTED_ITEM_DIR",
    "cmd": "cat $SELECTED_ITEM",
    "shortcut": "Ctrl-Alt-C"
  }
]
  • name name of the configuration entry, optional
  • dir specifies the directory in which the command should be run, required
  • cmd the actual command, required
  • shortcut the keyboard shortcut that will activate the command, required
  • autohide whether the feedback panel with the command output should be hidden automatically, optional

$PROJECT_ROOT is a special variable that denotes the root directory of the currently open project. This way when opening multiple projects in a sequence the shortcuts will be applicable for each project provided that the configured commands can be run in the root of each open project.

If no dir field is specified it is assumed to be $PROJECT_ROOT.

In order for changes to be applied just reload Brackets.

Supported variables

The following variables can be used in the configuration as values for dir and cmd:

  • $PROJECT_ROOT root directory of the current project
  • $SELECTED_ITEM path to the file currently selected in the project
  • $SELECTED_ITEM_DIR path to the parent directory of the file currently selected in the project

Use shortcuts

After re-loading Brackets with the latest version of the configuration just use the shortcuts. In the example above

Ctrl-Shift-B will build the project and Ctrl-Shift-P will fetch the latest sources from its Git repository.

Supported platforms

The plugin has been tested on Windows 8 and Ubuntu Linux.

Report issues

Issues can be reported at https://github.com/antivanov/Brackets-Command-Line-Shortcuts/issues

License

MIT License (c) Anton Ivanov

Credits

The plugin was in part inspired by Brackets Builder

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.