{"id":13961372,"url":"https://github.com/oakmac/sublime-text-parinfer","last_synced_at":"2025-04-12T19:41:16.847Z","repository":{"id":53593009,"uuid":"46540770","full_name":"oakmac/sublime-text-parinfer","owner":"oakmac","description":"Parinfer plugin for Sublime Text","archived":false,"fork":false,"pushed_at":"2023-09-07T22:20:47.000Z","size":214,"stargazers_count":58,"open_issues_count":8,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T13:54:03.743Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oakmac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-20T05:07:27.000Z","updated_at":"2025-01-20T14:56:48.000Z","dependencies_parsed_at":"2024-01-15T03:59:23.120Z","dependency_job_id":"48f1cc30-01c2-4a69-b69b-2918fde36c46","html_url":"https://github.com/oakmac/sublime-text-parinfer","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fsublime-text-parinfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fsublime-text-parinfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fsublime-text-parinfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fsublime-text-parinfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oakmac","download_url":"https://codeload.github.com/oakmac/sublime-text-parinfer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248624894,"owners_count":21135509,"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-08T17:01:05.372Z","updated_at":"2025-04-12T19:41:16.826Z","avatar_url":"https://github.com/oakmac.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Parinfer for Sublime Text\n\nA [Parinfer] package for [Sublime Text].\n\n## What is Parinfer?\n\nParinfer is a text editing mode that can infer Lisp code structure from\nindentation (and vice versa). A detailed explanation of Parinfer can be found\n[here].\n\nPut simply: the goal of Parinfer is to make it so you never have to think about\n\"balancing your parens\" when writing or editing Lisp code. Just indent your code\nas normal and Parinfer will infer the intended paren structure.\n\n## Installation\n\n### Package Control\n\nIf you have [Package Control] installed, you can easily install the\n[Parinfer](https://packagecontrol.io/packages/Parinfer) package:\n\n1. In Sublime Text, open the Command Palette by typing \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003ep\u003c/kbd\u003e\n   (\u003ckbd\u003eCmd\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003ep\u003c/kbd\u003e on Mac)\n2. Type `install` and select `Package Control: Install Package`\n3. A text prompt should appear shortly after Package Control loads a list of\n   packages from the Internet.\n4. Type `parinfer` and press \u003ckbd\u003eEnter\u003c/kbd\u003e\n5. That's it! Parinfer is now installed.\n\n### Linux / OSX\n\nYou can symlink this repo to the Sublime Text Packages directory:\n\n```sh\ncd ~\ngit clone git@github.com:oakmac/sublime-text-parinfer.git\nln -s ~/sublime-text-parinfer ~/Library/Application\\ Support/Sublime\\ Text/Packages/Parinfer\n```\n\n### Windows\n\n```\ncd %APPDATA%\\Sublime Text 2\\Packages\ngit clone https://github.com/oakmac/sublime-text-parinfer.git Parinfer\n```\n\n## Usage\n\n### File Extensions\n\nOnce installed, Parinfer will automatically activate when you open a file with\na [known file extension].\n\nYou can change the list of watched file extensions by going to Preferences --\u003e\nPackage Settings --\u003e Parinfer --\u003e Settings.\n\n[known file extension]:https://github.com/oakmac/sublime-text-parinfer/blob/master/Parinfer.sublime-settings#L2-L9\n\n### Opening a File\n\nWhen a file with a recognized extension is opened, Parinfer will enter\n`Parinfer: Waiting` mode and wait for the **first edit to the buffer**. When\nthe first edit occurs, Parinfer will enter `Parinfer: Indent` mode and begin\ncontrolling closing parenthesis based on indentation.\n\n### Behavior Change for v1.0.0\n\nBefore v1.0.0, when a file was opened Parinfer would run Paren Mode on the\nentire file first before entering Indent Mode (see [Fixing existing files]\nfor more details). This was not a problem for regular users of Parinfer\nbecause running Paren Mode on a file written using Parinfer will not result\nin any changes.\n\nHowever, this behavior was [sometimes confusing] for users new to Parinfer\nwhen they would open a file not written using Parinfer and see edits in\nplaces they did not intend to make.\n\n[sometimes confusing]:https://github.com/oakmac/sublime-text-parinfer/issues/43\n\nStarting with v1.0.0, Parinfer will first enter \"Waiting\" mode and only begin\ncontrolling closing parens after the first modification to the buffer. If you\ndesire the pre-v1.0.0 behavior, set the config setting\n`run_paren_mode_when_file_opened` to `true`.\n\nAdditionally, there is a new `Parinfer: Run Paren Mode on Current Buffer`\ncommand that can be executed at anytime and will run Paren Mode over the\nentire active buffer.\n\n### Hotkeys and Status Bar\n\n|  Command              | Windows/Linux                | Mac                         |\n|-----------------------|-----------------------------:|-----------------------------|\n| Turn on / Toggle Mode | \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003e(\u003c/kbd\u003e | \u003ckbd\u003eCmd\u003c/kbd\u003e+\u003ckbd\u003e(\u003c/kbd\u003e |\n| Turn off              | \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003e)\u003c/kbd\u003e | \u003ckbd\u003eCmd\u003c/kbd\u003e+\u003ckbd\u003e)\u003c/kbd\u003e |\n\nThe status bar will indicate which mode you are in or show nothing if Parinfer\nis turned off.\n\n## The \"parent expression\" hack\n\nThis extension uses a hack for performance reasons that may result in odd\nbehavior in rare cases. It assumes that an open paren followed by an alpha\ncharacter - ie: regex `^\\([a-zA-Z]` - at the start of a line is the beginning\nof a new \"parent expression\" and tells the Parinfer algorithm to start\nanalyzing from there until the next line that matches the same regex. Most of\nthe time this is probably a correct assumption, but might break inside\nmulti-line strings or other non-standard circumstances. This is tracked at\n[Issue #23]; please add to that if you experience problems.\n\n## License\n\n[ISC license]\n\n[here]:http://shaunlebron.github.io/parinfer/\n[Parinfer]:http://shaunlebron.github.io/parinfer/\n[Sublime Text]:http://www.sublimetext.com/\n[Package Control]:https://packagecontrol.io/\n[Issue #24]:https://github.com/oakmac/sublime-text-parinfer/issues/24\n[Issue #4]:https://github.com/oakmac/sublime-text-parinfer/issues/4\n[Paren Mode]:http://shaunlebron.github.io/parinfer/#paren-mode\n[Indent Mode]:http://shaunlebron.github.io/parinfer/#indent-mode\n[Fixing existing files]:http://shaunlebron.github.io/parinfer/#fixing-existing-files\n[issues]:https://github.com/oakmac/sublime-text-parinfer/issues\n[Issue #23]:https://github.com/oakmac/sublime-text-parinfer/issues/23\n[catching very hard-to-find bugs]:https://github.com/oakmac/atom-parinfer/commit/d4b49ec2636fd0530f3f2fbca9924db6c97d3a8f\n[ISC License]:LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fsublime-text-parinfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foakmac%2Fsublime-text-parinfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fsublime-text-parinfer/lists"}