{"id":21091539,"url":"https://github.com/eiskrenkov/magiccomment","last_synced_at":"2025-05-16T13:31:55.034Z","repository":{"id":50227645,"uuid":"469172388","full_name":"eiskrenkov/MagicComment","owner":"eiskrenkov","description":"Fully customizable Sublime Text plugin that automatically inserts configured pragma comments for you","archived":false,"fork":false,"pushed_at":"2022-03-31T22:05:45.000Z","size":14,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T01:51:04.300Z","etag":null,"topics":["python","sublime-package","sublime-plugin","sublime-text","sublime-text-plugin"],"latest_commit_sha":null,"homepage":"https://packagecontrol.io/packages/MagicComment","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/eiskrenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-12T18:50:56.000Z","updated_at":"2023-01-25T16:11:12.000Z","dependencies_parsed_at":"2022-09-13T05:11:33.298Z","dependency_job_id":null,"html_url":"https://github.com/eiskrenkov/MagicComment","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2FMagicComment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2FMagicComment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2FMagicComment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2FMagicComment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiskrenkov","download_url":"https://codeload.github.com/eiskrenkov/MagicComment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538477,"owners_count":22087870,"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":["python","sublime-package","sublime-plugin","sublime-text","sublime-text-plugin"],"created_at":"2024-11-19T21:46:51.655Z","updated_at":"2025-05-16T13:31:54.753Z","avatar_url":"https://github.com/eiskrenkov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MagicComment ✨ for Sublime Text\nMagicComment is a fully customizable Sublime Text plugin that automatically inserts required magic comments for you\n\nDevelopment is motivated by `frozen_string_literal` comment for Ruby files, but plugin can be used for literally any kind of files and any strings that you want to automatically insert\n\n## Manual usage Demo\n![Screen Recording 2022-03-14 at 01 17 57](https://user-images.githubusercontent.com/39211838/158079694-79eb9a74-91fb-4eb9-9b4f-0ae2b3a83359.gif)\n\n## Installation\n\n### Package Control\nMagicComment is available at [Package Control]. Just select `Package Control: Install Package` in Sublime command palette and search for `MagicComment`\n\n### Manual Installation\n- `cd \u003cPackages directory\u003e` (macOS: `~/Library/Application\\ Support/Sublime\\ Text/Packages`)\n- `git clone https://github.com/eiskrenkov/MagicComment.git`\n\n## Usage\n- **On file save** - Enabled by default, can be disabled in settings\n- **Key Bindings** - Commented by default, can be configured to anything you want\n- **Command Palette** - `CMD+P` and type `MagicComment` (or just `comment`) and select `MagicComment: Insert Comments`\n\n\u003e You can always configure key bindings at _Sublime Text menu_ -\u003e _Preferences_ -\u003e _Package Settings_ -\u003e _MagicComment_ -\u003e _Key Bindings_\n\n## Default Configuration\n\u003e Remember, that you can always reconfigure it, just open _Sublime Text menu_ -\u003e _Preferences_ -\u003e _Package Settings_ -\u003e _MagicComment_ -\u003e _Settings_\n\n### General\n- `run_on_save`\n    - Type: `Boolean`\n    - Default: `true`\n\n### Comments\n- `text` - Text of the comment to insert\n    - Type: `String`\n    - Default: `true`\n\n- `line` - Number of the line you wish to insert the comment\n    - Type: `Integer`\n    - Default: `1`\n\n- `blank_lines` - Amount of blank lines to insert after the comment\n    - Type: `Integer`\n    - Default: `0`\n\n- `files` - Object, containing files specific settings\n    - Type: `Object`\n\n- `files` -\u003e `include` - List of file names and extensions to insert comment for\n    - Type: `Array` of `String`\n    - Default: `[]`\n\n- `files` -\u003e `exclude` - List of file names and extensions that you want to ignore\n    - Type: `Array` of `String`\n    - Default: `[]`\n\n\u003e Note, that **Include** and **Exclude** arrays support wildcards for file extensions via '*'. E.g *.rb mathes all Ruby files, *.py - all Python files and so on\n\n### Example configuration for `#frozen_string_literal: true` for `.rb` files\n```json\n{\n    \"text\": \"# frozen_string_literal: true\",\n    \"line\": 1,\n    \"blank_lines\": 1,\n    \"files\": {\n        \"include\": [\"*.rb\", \"Gemfile\", \"Rakefile\", \"config.ru\"],\n        \"exclude\": [\"schema.rb\"]\n    }\n}\n```\n\n## Contribution\nIssues and pull requests are highly welcome!\n\n[Package Control]: https://packagecontrol.io/packages/MagicComment\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Fmagiccomment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiskrenkov%2Fmagiccomment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Fmagiccomment/lists"}