{"id":17648165,"url":"https://github.com/natebosch/dartlang-snippets","last_synced_at":"2025-05-07T06:03:34.063Z","repository":{"id":150399929,"uuid":"50461721","full_name":"natebosch/dartlang-snippets","owner":"natebosch","description":"UltiSnips snippets for Dart","archived":false,"fork":false,"pushed_at":"2021-08-20T17:15:11.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T06:02:44.097Z","etag":null,"topics":["dart","ultisnip-snippets","ultisnips","vim"],"latest_commit_sha":null,"homepage":null,"language":"Vim Snippet","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/natebosch.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-26T21:48:39.000Z","updated_at":"2024-05-09T21:33:03.000Z","dependencies_parsed_at":"2023-05-28T11:45:50.312Z","dependency_job_id":null,"html_url":"https://github.com/natebosch/dartlang-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fdartlang-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fdartlang-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fdartlang-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fdartlang-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natebosch","download_url":"https://codeload.github.com/natebosch/dartlang-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823921,"owners_count":21809713,"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":["dart","ultisnip-snippets","ultisnips","vim"],"created_at":"2024-10-23T11:16:37.775Z","updated_at":"2025-05-07T06:03:33.994Z","avatar_url":"https://github.com/natebosch.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UltiSnips snippets for Dart\n\nA collection of snippets for writing Dart. Start by reading about [UltiSnips][]\nif you haven't used if before.\n\n[UltiSnips]: https://github.com/SirVer/ultisnips\n\n# Highlights\n\nSome of the snippets that save the most typing.\n\n## Dart code\n\n### `im`\n\nImport line. `im\u003ctab\u003esome_package` becomes\n`import 'package:some_package/some_package.dart';`\n\n### `for`\n\nFor-in loop. `for\u003ctab\u003eelement` becomes\n\n```dart\nfor(var element in elements) {\n  |\n}\n```\n\n### `try`\n\nTry-catch. Most useful from visual mode with a block selected, fills the\nselection in the `try`, then tab to fill out the `catch`.\n\n[![asciicast](https://asciinema.org/a/101189.png)](https://asciinema.org/a/101189)\n\n### Methods\n\nEach of these triggers has 2 modes. At the beginning of the line they generate a\ntop-level/instance method. After other characters they generate a closure.\n\n- `m`\n  - `m\u003ctab\u003eReturnType\u003ctab\u003emethodName\u003ctab\u003eArgType argument` becomes\n\n     ```dart\n     ReturnType methodName(ArgType argument) {\n       |\n     }\n     ```\n  -  After other characters: `m\u003ctab\u003eargument` becomes\n\n     ```dart\n     (argument) {\n       |\n     }\n     ```\n- `r`\n  - `r\u003ctab\u003eReturnType\u003ctab\u003emethodName\u003ctab\u003eArgType argument` becomes\n\n     `ReturnType methodName(ArgType argument) =\u003e |`\n  -  After other characters: `r\u003ctab\u003eargument` becomes\n\n     `(argument) =\u003e |`\n\nPrepending either trigger with `a` makes it use 'async mode'. For example, at\nthe beginning of a line:\n\n`ar\u003ctab\u003eReturnType\u003ctab\u003emethodName\u003ctab\u003eArgType argument` becomes\n\n`Future\u003cReturnType\u003e methodName(ArgType argument) async =\u003e |`\n\n## Angular Snippets\n\n### `co`\n\nA `@Component` annotation and class. Saves the most time if you follow a naming\nconvention: a class name `SomeName` has a selector like `some-name`, a template\nat `some_name.html`, and styles at `some_name.css` or `some_name.scss.css`.\nFills out a default name which works well if this component lives in a file\nnamed `some_name.dart`.\n\n[![asciicast](https://asciinema.org/a/101181.png)](https://asciinema.org/a/101181)\n\n# Installation\n\nInstall this repository and UltiSnips using your favorite method. If you used\n[vim-plug][]:\n\n```vimscript\nPlug 'SirVer/Ultisnips'\nPlug 'natebosch/dartlang-snippets'\n```\n\n[vim-plug]: https://github.com/junegunn/vim-plug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatebosch%2Fdartlang-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatebosch%2Fdartlang-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatebosch%2Fdartlang-snippets/lists"}