This is a Sublime Text plugin for executing (or building) part of your code. (It should work for any language that the Sublime Text 2 originally can build)
- Total 691
- Win 338
- OS X 221
- Linux 132
|Jan 23||Jan 22||Jan 21||Jan 20||Jan 19||Jan 18||Jan 17||Jan 16||Jan 15||Jan 14||Jan 13||Jan 12||Jan 11||Jan 10||Jan 9||Jan 8||Jan 7||Jan 6||Jan 5||Jan 4||Jan 3||Jan 2||Jan 1||Dec 31||Dec 30||Dec 29||Dec 28||Dec 27||Dec 26||Dec 25||Dec 24||Dec 23||Dec 22||Dec 21||Dec 20||Dec 19||Dec 18||Dec 17||Dec 16||Dec 15||Dec 14||Dec 13||Dec 12||Dec 11||Dec 10|
BuildParts (version 0.3.0)
This is a Sublime Text plugin for executing (or building) part of your code.
Install using Package Control (Recommanded)
- I guess most Sublime Text 2 users are using Sublime Package Control. If not, please install it from here http://wbond.net/sublime_packages/package_control
- Go to Preference > Package Control, and Choose “Install Package”
- Choose the package named “BuildParts” to install it
- If BuildParts is not available from Package Control, you can go to Preference > Package Control, and Choose “Add Repository”. Put “https://github.com/erinata/BuildParts” (without quotes) to add the repo and try step 2 and 3 again.
- Download the repo
- Copy everything in the repo to a folder named “BuildParts” under the package folder of SublimeText 2 (create it if it doesn't exist)
There is only one command:
BuildParts: Build the selected code
When you select some code and invoke this command, this package will build the selected code using the currently chosen build system. If you have selected nothing, this package will build the whole file. (So that you still get the default Sublime Text build system behaviour)
BuildParts default keybindings are “ctrl+b” (for Windows and Linux) and “super+b” (for Mac). It's the same as the default keybinding for building your code. If you want to invoke the build system for the whole file. Just select nothing and press “ctrl+b”.
Suppose you have a document named
Puts("Hello") Puts("World") Puts("Everyone")
Suppose you select the first 2 lines, and press “ctrl+b”, the package will only build the currently selected parts (which are first 2 lines in this case). The build output console will show:
It is useful when you want to execute several lines of your code (especially for interpreted language say Ruby) and see how it works.
If you select nothing and press “ctrl+b”, the package will involve the default behaviour in Sublime Text and build the whole file. The build output console will show:
Hello World Everyone
As BuildParts utilizes the build system in Sublime Text, it supports any language that Sublime Text can build. It also work with custom build systems that are installed via packages.
BuildParts is not supporting multiple selections for now.
I only tested this on Windows, I hope that it works on OSX and Linux.
Copyright © 2012 Tom Lam. MIT License.