{"id":13523928,"url":"https://github.com/jcartledge/sublime-worksheet","last_synced_at":"2025-04-01T01:33:51.941Z","repository":{"id":8731375,"uuid":"10405378","full_name":"jcartledge/sublime-worksheet","owner":"jcartledge","description":"An inline REPL for JavaScript, PHP, Ruby \u0026 more in Sublime Text 2 and 3","archived":false,"fork":false,"pushed_at":"2013-08-23T05:22:41.000Z","size":1287,"stargazers_count":333,"open_issues_count":8,"forks_count":18,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-15T14:26:33.705Z","etag":null,"topics":[],"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/jcartledge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-31T13:28:49.000Z","updated_at":"2024-02-20T15:18:04.000Z","dependencies_parsed_at":"2022-09-19T06:41:53.993Z","dependency_job_id":null,"html_url":"https://github.com/jcartledge/sublime-worksheet","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcartledge%2Fsublime-worksheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcartledge%2Fsublime-worksheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcartledge%2Fsublime-worksheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcartledge%2Fsublime-worksheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcartledge","download_url":"https://codeload.github.com/jcartledge/sublime-worksheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246567544,"owners_count":20798192,"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":[],"created_at":"2024-08-01T06:01:05.178Z","updated_at":"2025-04-01T01:33:46.910Z","avatar_url":"https://github.com/jcartledge.png","language":"Python","funding_links":[],"categories":["Python","Extensions"],"sub_categories":["General Purpose"],"readme":"# Sublime Worksheet\n\nThis is a Sublime Text plugin for Mac OS X and Linux which passes the contents of a buffer line-by-line to a REPL and displays the results inline.\n\nIt works in Sublime Text 2 and 3.\n\n![a](docs/worksheet.gif)\n\nIt's great for trying things out directly in Sublime Text.\n\n**Windows support** Thanks to @timonwong v0.8.0 introduces experimental Windows support. Please report any issues you discover.\n\n## In this document\n\n - [Installation](#installation)\n - [Usage](#usage)\n - [Supported languages](#supported-languages)\n - [Known issues](#known-issues)\n - [Contributing](#contributing)\n\n## Installation\n\n### Package Control\n\n[Package Control](http://wbond.net/sublime_packages/package_control) is \"a full-featured package manager that helps discovering, installing, updating and removing packages for SublimeText 2.\" It's the preferred way to manage your SublimeText 2 Packages directory.\n\n[Follow these instructions](http://wbond.net/sublime_packages/package_control/usage) to install Sublime-worksheet with Package Control.\n\n### Using Git\n\nGo to your SublimeText 2 `Packages` directory and clone the repository using the command below:\n\n`$ git clone https://github.com/jcartledge/sublime-worksheet.git`\n\n### Download Manually\n\nDownload the files using the .zip download option.  \nUnzip the files.  \nCopy the folder to your SublimeText 2 Packages directory.\n\n## Usage\n\nSublime Worksheet provides two commands which you can access from the command palette (\u003ckbd\u003eCMD-SHIFT-P\u003c/kbd\u003e / \u003ckbd\u003eCTRL-SHIFT-P\u003c/kbd\u003e):\n\n### `Worksheet: Evaluate worksheet`\n\nPasses the contents of the current document line by line to the interpreter which matches its syntax setting.\n\nResults are inserted as comments directly below the statement, as they would appear if you were entering them in the REPL.\n\nThis automatically clears the results of previous evaluations first.\n\nYou don't need to save the document before running `Evaluate worksheet`, but if it has been saved then you can write imports/requires/includes relative to the file and they should work.\n\nAny errors or timeouts will cause evaluation to stop and the error to be written to the document. A timeout occurs if the REPL hasn't returned a result for an evaluated line after 10 seconds.\n\n### `Worksheet: Clear worksheet results`\n\nRemoves comments inserted by evaluating the worksheet.\n\n## Overide settings\n\nYou also can override Sublime Worksheet settings per-project so you can use your virtual environnement. For example, to add your virtualenv, just append this to your `.sublime-project` file:\n\n```json\n\"settings\": {\n    \"worksheet_languages\": {\n        \"Python\": {\n            \"cmd\": \"/home/adrien/.pyenvs/web2/bin/python -i\",\n            \"prompt\": [\"\u003e\u003e\u003e \", \"\\\\.\\\\.+ \"],\n            \"prefix\": \"# \u003e \",\n            \"error\": [\"Traceback \", \"  File \\\"\u003cstdin\u003e\\\",\"]\n        },\n    }\n}\n```\n\nPlease see the `worksheet.sublime-settings` for more configuration examples.\n\n## Supported Languages\n\nSublime worksheet uses the interpreters you have installed on your system. Generally speaking if you can run an interpreter from the command line it should work in Sublime Text. The following languages are supported:\n\n### Elixir\n\nUses the `iex` interpreter running on the Erlang VM.\n\n - [Installation instructions](http://elixir-lang.org/getting_started/1.html) \n\n### JavaScript\n\nUses the interactive mode of the NodeJS command line interpreter.\n\n - [Installing Node.js via package manager](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager)\n - [Source code and binary downloads](http://nodejs.org/download/) \n\n### Perl\n\nUses `re.pl` which is provided by the `Devel::REPL` package.\n\n - Install via [CPAN](http://www.cpan.org/):\n\n```bash\n  # You may need to run these as root  \n  cpan -i Devel::REPL  \n  # You also need to install a readline implemetation:  \n  cpan -i Term::ReadLine::Perl\n```\n\n - Install using your OS package manager e.g. `apt-get install libdevel-repl-perl`\n\n### PHP\n\nUses the PHP CLI executable in interactive mode (`php -a`).  \nSee your OS package manager documentation or [the PHP website](http://php.net/downloads.php) for help setting this up.\n\n### Python\n\nUses the interactive mode of the Python binary (`python -i`).  \nSee your OS package manager documentation or [the Python website](http://www.python.org/download/) for help setting this up.\n\n### Ruby\n\nUses `irb`.  \nSee your OS package manager documentation or [the Ruby website](http://www.ruby-lang.org/en/downloads/) for help setting this up.\n\n### Scala\n\nUses the [Scala REPL](http://www.scala-lang.org/node/2097).  \nSee your OS package manager documentation or [the Scala website](http://www.scala-lang.org/downloads) for help setting this up.\n\n### Racket/Scheme\n\nUses [Guile](http://www.gnu.org/software/guile/).  \nSee your OS package manager documentation or [the Guile website](http://www.gnu.org/software/guile/download.html#releases) for help setting this up.\n\n## Known issues\n\n### Python IndentationError\n\nThere is an issue where code which is interpreted correctly by non-interactive Python causes an indentation error in interactive Python.\n\nThis arises when indented lines are separated by one or more unindented blank lines. The simple workaround is to indent the blank lines to the level of the surrounding indentation.\n\nFor more information see [this issue](https://github.com/jcartledge/sublime-worksheet/issues/23) or [this StackOverflow thread](http://stackoverflow.com/questions/2727988/python-indentation-in-empty-lines).\n\n## Contributing\n\nPlease feel free. More REPLs would be great - take a look at [worksheet.sublime-settings](worksheet.sublime-settings) (and [this pull request](https://github.com/jcartledge/sublime-worksheet/pull/22)) for details of how these are implemented.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcartledge%2Fsublime-worksheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcartledge%2Fsublime-worksheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcartledge%2Fsublime-worksheet/lists"}