ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Pipe Dream

by billymoon ST2

Pipe Dream plugin for Sublime Text 2 - Pipes selected text through shell commands

Details

  • 2014.06.15.18.50.15
  • github.​com
  • github.​com
  • 10 years ago
  • 1 hour ago
  • 11 years ago

Installs

  • Total 146
  • Win 40
  • Mac 75
  • Linux 31
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Pipe Dream plugin for Sublime Text

Pipes selected text through shell commands

Sublime Text

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