{"id":13611639,"url":"https://github.com/molon/MLAutoReplace","last_synced_at":"2025-04-13T05:33:11.087Z","repository":{"id":16409326,"uuid":"19160381","full_name":"molon/MLAutoReplace","owner":"molon","description":"Xcode plugin which help you write code faster.","archived":false,"fork":false,"pushed_at":"2018-09-11T07:59:59.000Z","size":2928,"stargazers_count":231,"open_issues_count":0,"forks_count":28,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-11T03:44:38.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/molon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-25T20:51:18.000Z","updated_at":"2025-01-16T10:26:04.000Z","dependencies_parsed_at":"2022-09-02T14:51:57.179Z","dependency_job_id":null,"html_url":"https://github.com/molon/MLAutoReplace","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molon%2FMLAutoReplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molon%2FMLAutoReplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molon%2FMLAutoReplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molon%2FMLAutoReplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molon","download_url":"https://codeload.github.com/molon/MLAutoReplace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670513,"owners_count":21142896,"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-01T19:01:59.441Z","updated_at":"2025-04-13T05:33:08.649Z","avatar_url":"https://github.com/molon.png","language":"Objective-C","readme":"MLAutoReplace\n=============\n\nXcode plugin, Re-Intent, make you write code more quickly.   \nUse a portion code of [VVDocumenter-Xcode](https://github.com/onevcat/VVDocumenter-Xcode).\n\n##Overview\nYou can use shortcut key `Shift+Command+\\` to auto re-indent all source of the current edit file.  \n\nYou can custom other replacer with regex.  \n![regex replace](https://raw.githubusercontent.com/molon/MLAutoReplace/master/replaceOther.gif)  \n![regex replace](https://raw.githubusercontent.com/molon/MLAutoReplace/master/replaceTS.gif)  \n![pseudo-generic](https://raw.githubusercontent.com/molon/MLAutoReplace/master/pseudo-generic.gif)\n\nYou can input common getter quickly.  \n![replace getter](https://raw.githubusercontent.com/molon/MLAutoReplace/master/replaceGetter.gif)  \n\n##How to install?\nDownload this project and run.  \n\n##Regex replacer\n\nExmple:  \n![replace getter](https://raw.githubusercontent.com/molon/MLAutoReplace/master/regex.png)  \nThis item means that plugin will replace `@s/` to `@property (nonatomic, strong) \u003c#custom#\u003e`.  \n\n\nThe plugin will detect the content of current input line.  \n\nSome placeholders can be replace with context.\n\n- `\u003cdatetime\u003e`: current datetime, you can use it to mark your edit time.\n- `\u003cdeclare_class_below\u003e`: the class name of the first `@interface XXX :` below.\n- `\u003c{0}\u003e`,`\u003c{1}\u003e`...: these placeholders will be replaced with its corresponding position of regex result.\n\nA demo for pseudo-generic(https://github.com/ibireme/YYModel/issues/79):\n\n![pseudo-generic](https://raw.githubusercontent.com/molon/MLAutoReplace/master/pseudo-generic.gif)\n\nIt uses two styles of placeholders:\n\n`\u003cdeclare_class_below\u003e`: \n\n```\nregex: ^\\s*@[Pp]{2}$\nreplaceContent: @protocol \u003cdeclare_class_below\u003e;\n```\n\n`\u003c{0}\u003e`,`\u003c{1}\u003e`(location placeholders):\n\n```\nregex: ^\\s*@property\\s*\\(\\s*nonatomic\\s*(,\\s*strong\\s*|)\\)\\s*(NSArray|NSMutableArray|NSSet|NSMutableSet)\\s*\u003c\\s*(\\w+)\\s*\u003e$\nreplaceContent: @property (nonatomic\u003c{0}\u003e) \u003c{1}\u003e\u003c\u003c{2}\u003e *\u003e\u003c\u003c{2}\u003e\u003e *\u003c#name#\u003e\n\nregex: ^\\s*@property\\s*\\(\\s*nonatomic\\s*(,\\s*strong\\s*|)\\)\\s*(NSDictionary|NSMutableDictionary)\\s*\u003c\\s*(\\w+)\\s*\u003e$\nreplaceContent: @property (nonatomic\u003c{0}\u003e) \u003c{1}\u003e\u003cNSString *,\u003c{2}\u003e *\u003e\u003c\u003c{2}\u003e\u003e *\u003c#name#\u003e\n\n```\n\n##Re-Indent\n\nJust can be quickly re-intent. \n\nIf you find that press `Shift+Command+\\` does nothing.   \nPlease ensure that the shortcut key setting of Re-Intent is default.\n![re-intent shortcut key setting](https://raw.githubusercontent.com/molon/MLAutoReplace/master/re-intent-setting.png) \n\n##Getter replacer\n\n**In fact, this feature can be implemented with location placeholders. But I am not willing to delete the old feature.**\n\nYou need add your own common syntax to the getter replacer.  \n![replace getter](https://raw.githubusercontent.com/molon/MLAutoReplace/master/addReplaceGetter.gif)  \n\n`\u003cname\u003e` means the property name.  \n`\u003c#xxx#\u003e` means where need to input in,it is recommended to provide.  \n\nExmple:\n\n```\n- (UIImageView *)\u003cname\u003e\n{\n    if (!_\u003cname\u003e) {\n\t\tUIImageView *imageView = [[UIImageView alloc]init];\n        imageView.image = [UIImage imageNamed:@\"\u003c#imageName#\u003e\"];\n        imageView.contentMode = UIViewContentModeScaleAspectFill;\n        \u003c#custom#\u003e\n\n        _\u003cname\u003e = imageView;\n    }\n    return _\u003cname\u003e;\n}\n```  \n  \nYou must reload .plist file with shortcut `control+option+command+\\` after editing and saving it.   \nYou can also reload it with the `Reload .plist Data` button in MLAutoReplace window.   \n\nHow to use:   \n```\n- (UIImageView *)xxx///\n```   \nDont forget `///` please. :)\n","funding_links":[],"categories":["Objective-C","Unofficial","非官方","WebSocket"],"sub_categories":["Plugins","\u003ca name=\"plugins\"\u003e\u003c/a\u003e插件"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolon%2FMLAutoReplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolon%2FMLAutoReplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolon%2FMLAutoReplace/lists"}