Code Monkey home page Code Monkey logo

sublime-pipe-dream's Introduction

Pipe Dream plugin for Sublime Text

Pipes selected text through shell commands

About

This is a Sublime Text plugin, allowing you to pipe selected text (multiple regions ok) or the buffer contents through arbitrary shell commands.

Installation

Package Control -> Install Package -> Pipe Dream

Usage

Either select a region (or regions) to operate on, or the plugin will use all the text in the window.

Goto: Tools -> Command Palette (Cmd+Shift+P or Ctrl+Shift+P) and type any of the commands...

Windows and Linux

This plugin has not been tested on these platforms, but I expect it to work, I would appreciate if someone could let me know if it does, or if there are any issues

Commands

These commands are built in, and just to start you off. The idea is that you can easily define your own Pipe Dreams by editing the keymap files, or the commands file.

The keyboard shortcuts set by default, but can be edited easily in the relevant OS's keymap file.

  • Pipe Dream: Beautify JavaScript (uglifyjs)
    • keys:ctrl+alt+a b
    • type: text_replace
    • cmds: uglifyjs -b --comments all
  • Pipe Dream: Minify JavaScript (uglifyjs)
    • keys:ctrl+alt+a u
    • type: text_replace
    • cmds: uglifyjs
  • Pipe Dream: Execute JavaScript
    • keys:ctrl+alt+a x j
    • type: console_log
    • cmds: node

Customize

The Sublime-Pipe-Dream.sublime-commands file has some pre-defined commands, but you are strongly encouraged to make your own, and share them by adding an issue with your dreams.

Oh no! command not found...

If you get an error sh: node: command not found or similar, maybe you don't have node (or similar) in the right path. Try setting the absolute path to node in User/Sublime-Pipe-Dream.sublime-settings.

This means from: "PATH": "/usr/sbin:/sbin:/usr/local/bin:"

change to: "PATH": "/usr/sbin:/sbin:/usr/local/bin:/path/to/node/folder:"

Have fun!

Oh yeah!

Big thanks to Victor Porof for the original plugin I adapted: https://github.com/victorporof/Sublime-HTMLPrettify

sublime-pipe-dream's People

Contributors

billymoon avatar

Stargazers

 avatar Oleg Gromov avatar Nazeeruddin Ikram avatar Sascha Brossmann avatar Michael Reinhardt avatar Michael Barnes avatar Paul Fultz II avatar  avatar Paul Bissex avatar Ron Martinez avatar

Watchers

James Cloos avatar  avatar

sublime-pipe-dream's Issues

ST3 Support

This does not work in ST3 (in Linux at least). I realize you did not advertise anywhere that it does, so I guess this is a request. That said, the Sublime-HTMLPrettify plugin you adapted this from does work in ST3.

[feature] Arbitrary Commands

It would be useful to open a text prompt to let the user pipe selections through any arbitrary command, as opposed to having to pre-define them.

If issue #1 is fixed I can fork this and work on this feature myself. Actually for all I know this feature might even already exist, haha.

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.