{"id":16934240,"url":"https://github.com/b-g/processing-sublime","last_synced_at":"2025-04-05T18:09:04.481Z","repository":{"id":3861472,"uuid":"4946634","full_name":"b-g/processing-sublime","owner":"b-g","description":"A Sublime Text package for the programming language Processing ","archived":false,"fork":false,"pushed_at":"2018-12-29T08:49:08.000Z","size":499,"stargazers_count":448,"open_issues_count":6,"forks_count":60,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-03-29T17:10:00.844Z","etag":null,"topics":["processing","processing-sketch","sublime-package","sublime-text"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b-g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-08T14:08:04.000Z","updated_at":"2025-03-13T16:47:43.000Z","dependencies_parsed_at":"2022-09-15T02:50:20.120Z","dependency_job_id":null,"html_url":"https://github.com/b-g/processing-sublime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-g%2Fprocessing-sublime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-g%2Fprocessing-sublime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-g%2Fprocessing-sublime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-g%2Fprocessing-sublime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-g","download_url":"https://codeload.github.com/b-g/processing-sublime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378149,"owners_count":20929297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["processing","processing-sketch","sublime-package","sublime-text"],"created_at":"2024-10-13T20:51:38.021Z","updated_at":"2025-04-05T18:09:04.445Z","avatar_url":"https://github.com/b-g.png","language":"Python","readme":"# Processing Package for Sublime Text\n\nA [Processing](http://processing.org/) package for [Sublime Text 2 and 3](http://www.sublimetext.com/). Check the [demo video](https://vimeo.com/45573600) on vimeo!\nPlease note: you must have at least (\u003e=Processing 2.0b6), otherwise the build system of the this package won't work. The video is a bit outdated, you don't have to run any longer the Processing.app in parallel to run sketches. If you have to use an old Processing version (e.g. 1.5.1), you can use [version 1.0 of this package](https://github.com/b-g/processing-sublime/releases/tag/v1.0_Processing_1.5.1).\n\n[\u003cimg src=\"https://github.com/b-g/processing-sublime/raw/master/Images/overview.png\"\u003e](https://vimeo.com/45573600)\n\n\n## Preparations\n### OSX\nUse Processing's _Tools \u003e Install \"processing-java\"_ menu item after you have installed Processing.\n\n![Use external editor preference](https://github.com/b-g/processing-sublime/raw/master/Images/processing_preferences.gif \"Use external editor preference\")\n\nThis package assumes that you chose to install `processing-java` for all users (recommended). If you choose to install `processing-java` only in your home directory, then you have to slightly change the build script, see the comment in the file [Processing.sublime-build](https://github.com/b-g/processing-sublime/blob/master/Build%20Systems/Processing.sublime-build).\n\n### Linux\nYou will need to set your `PATH` to where your processing application is located, e.g.:\n`export PATH=$PATH:/opt/processing/processing-2.0b4`\n\nYou also need to create an alias for `processing-java` in `/bin/` instead of `/usr/bin/`, e.g.:\n`sudo ln -s /opt/processing/processing-java /bin/processing-java`\n\n### Windows\nYou will need to set your `PATH` environment variable to where your processing application is located:\n\n- Open the \"Advanced System Settings\" by running `sysdm.cpl`\n- In the \"System Properties\" window, click on the _Advanced_ tab.\n- In the \"Advanced\" section, click the _Environment Variables_ button.\n- Edit the \"Path\" variable. Append the processing path (e.g. `;C:\\Program Files\\Processing-2.0b6\\`) to the variable value. Each entry is separated with a semicolon.\n\nOr, write a separate build system as documented in this [comment](https://github.com/b-g/processing-sublime/issues/17#issuecomment-15585500).\n\n![Advanced System Settings \u003e Environment Variables](https://github.com/b-g/processing-sublime/raw/master/Images/processing_path_windows.gif \"Windows Environment Variables\")\n\n\n## Installation\nThere are three easy ways to install the Processing package:\n\n### Using Sublime Package Control\nIf you are using [Sublime Package Control](https://packagecontrol.io/), you can easily install the [Processing Package](https://packagecontrol.io/packages/Processing) via the _Sublime Text \u003e Preferences \u003e Package Control: Install Package_ menu item.\n\n### Using Git\nAlternatively you can install the package and keep up to date by cloning the repo directly into your Sublime Text `Packages` directory.\n\nGo to your Sublime Text `Packages` directory and clone this repository:\n`git clone https://github.com/b-g/processing-sublime/ Processing`\n\n### Download Manually\n- Download the files using the GitHub [.zip download option](https://github.com/b-g/processing-sublime/archive/master.zip).\n- Unzip the file and rename the directory to `Processing`.\n- Copy the directory to your Sublime Text `Packages` directory e.g. OS X: `~/Library/Application Support/Sublime Text 2/Packages/Processing`.\n\n\n## Usage\n- Open the directory containing a Processing sketch in Sublime Text. (e.g. Drag the folder to Sublime Text.)\n- In Sublime Text, select the _Tools \u003e Build System \u003e Processing_ menu item.\n- In Sublime Text, select your main `.pde` file and use **⌘B** to run the sketch. The build system expects that your sketch follows the normal directory structure and naming conventions of a Processing sketch (e.g. `mysketch/mysketch.pde`).\n- With **⇧⌘B** and typing `build`, you can select alternative build systems, such as _Run sketch fullscreen_ and various _Export sketch_ options.\n\n### Custom Shortcuts\nTo get `.pde` files to run with **⌘R** and **⇧⌘R** (like Processing) instead of **⌘B** and **⇧⌘B**, add the following code to the User Key Bindings file via the _Preferences \u003e Key Bindings - User_ menu item in Sublime Text.\n\n```\n{\n  \"keys\": [\"super+r\"], \"command\": \"build\",\n  \"context\": [{ \"key\": \"selector\", \"operator\": \"equal\", \"operand\": \"source.pde\" }]\n},\n{\n  \"keys\": [\"super+shift+r\"], \"command\": \"build\",\n    \"args\": {\"variant\": \"Run sketch fullscreen\"},\n    \"context\": [{ \"key\": \"selector\", \"operator\": \"equal\", \"operand\": \"source.pde\" }]\n}\n```\n\n### Console Errors\nConsole error messages are clickable: e.g. double click `test.pde:10:0:10:0: The function rEEct(int, int, int, int) does not exist` to jump to the related line and file.\n\n### Filenames of Sketches\nYour filenames have to follow specific rules, otherwise they won't work with `processing-java`:\n\n- must not contain dashes `-` (see processing/processing#4861)\n- must not start with a number `0123456789` (see processing/processing#2152)\n- must not start with an underscore `_`  (see processing/processing#2152)\n- must adhere to [Java class naming rules](https://docs.oracle.com/javase/specs/jls/se11/html/jls-3.html#jls-3.8) (see [stackoverflow discussion](https://stackoverflow.com/a/65490/7574329) for the gist of it)\n\n## Want a \"Pure Java\" Project without Eclipse?\n\nComplex projects often lead people into using Processing with [Eclipse](http://eclipse.org). If you want to stick with Sublime Text, but want a \"pure Java\" Processing project _and_ the convenience of a fast \"build and run\" workflow, try creating a project with the _New Java Ant Project_ command (see [issue 61](https://github.com/b-g/processing-sublime/issues/61)) and run your sketch with the _Ant_ build system.\n\n### Prerequisites\nBe sure that [ant](http://ant.apache.org/) is installed and on your environment's `PATH`. You know this is right when you can open a terminal, run `ant`, and see a `Build failed` message. This means that [ant](http://ant.apache.org/) is runnable, and failing is ok because there is no \"Buildfile.\"\n\nMake sure that the variable `DEFAULT_PROCESSING_LIBRARY_PATH` within the file `Processing.py` inside this package matches your installation of Processing. If you are on OS X and `Processing.app` is in the `Applications` directory, then you do not need to edit this. Despite this, OS X users may need to install the [Fix Mac Path](https://packagecontrol.io/packages/Fix%20Mac%20Path) package, due to the way Sublime manages environment variables such as `PATH`.\n\n### Using the Command\n\n1. Create an empty directory (folder) for your new project, and open that empty directory in Sublime.\n2. Use either the menu item _Tools \u003e Processing \u003e New Java Ant Project_ or select the _Processing: New Java Ant Project_ command from the command pallete (**⇧⌘P**).\n3. Specify a Java package name for your source code (e.g. `com.myorg.myapp`).\n4. Use the _Tools \u003e Build System \u003e Ant_ menu item to ensure that _Ant_ is the active build system.\n5. Use **⌘B** to build and run your sketch. Out of the box, you should see a full screen app that displays the default 200x200px gray sketch, which is the Processing default.\n\nYou can now implement `setup` and `draw`, add additional classes to your sketch, and run it with **⌘B**. Just be sure that _Ant_ is the active build system.\n\n\n## Getting Started with Sublime Text\nIf you are new to Sublime I recommend the [Perfect Workflow in Sublime Text](http://code.tutsplus.com/courses/perfect-workflow-in-sublime-text-2) tutorial. If you are short of time, then make sure to at least watch [Multiple Cursors and Incremental Search](http://code.tutsplus.com/courses/perfect-workflow-in-sublime-text-2/lessons/multiple-cursors-and-incremental-search) (~6min), highly recommended!\n\n\n## Acknowledgements\n- Original [Processing TextMate Bundle](http://www.onebitwonder.com/projects/processing/): [Leon Hong](http://www.onebitwonder.com/)\n- Textmate to Sublime snippet conversion: [textmate-to-sublime-converter](https://github.com/srbs/textmate-to-sublime-converter)\n- Maintainer: [Benedikt Groß](http://benedikt-gross.de/log/), [Yong Joseph Bakos](http://yongbakos.com)\n- Syntax highlighting tweaking: [Mark Brand](https://github.com/ignism)\n- Linux build script and testing: [Julien Deswaef](http://xuv.be/)\n- Windows build script and documention: [Ralf Baecker](http://github.com/rlfbckr)\n- Error console capturer: [Greger Stolt Nilsen](http://gregerstoltnilsen.net/)\n- Syntax definition, snippet cleansing, Processing reference vs. sublime [diff tool](https://github.com/ybakos/processing-sublime-util), and _New Java Ant Project_ command: [Yong Joseph Bakos](http://yongbakos.com)\n- How to set custom shortcuts: [Raphaël de Courville](https://github.com/SableRaf)\n- Rebuild of the processing syntax highlighter: [Kyle Fleming](https://github.com/kylefleming)\n- Filenames rules of sketches: [MaxValue](https://github.com/MaxValue)\n\nSee the [contributing guide](https://github.com/b-g/processing-sublime/blob/master/CONTRIBUTING.md) to learn about how to contribute to this project.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-g%2Fprocessing-sublime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-g%2Fprocessing-sublime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-g%2Fprocessing-sublime/lists"}