{"id":15631772,"url":"https://github.com/ulex/zensharp","last_synced_at":"2025-04-08T03:19:11.151Z","repository":{"id":15421047,"uuid":"18153350","full_name":"ulex/ZenSharp","owner":"ulex","description":"ZenSharp for ReSharper is mnemonics on steroids!","archived":false,"fork":false,"pushed_at":"2024-09-23T15:16:41.000Z","size":465,"stargazers_count":181,"open_issues_count":7,"forks_count":18,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-04T11:59:39.088Z","etag":null,"topics":["c-sharp","nemerle","resharper","resharper-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","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/ulex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2014-03-26T20:48:14.000Z","updated_at":"2025-01-13T11:37:01.000Z","dependencies_parsed_at":"2024-01-29T18:16:09.796Z","dependency_job_id":"11b7d33d-cf84-4f79-94be-f3b93d804dbf","html_url":"https://github.com/ulex/ZenSharp","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulex%2FZenSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulex%2FZenSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulex%2FZenSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulex%2FZenSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ulex","download_url":"https://codeload.github.com/ulex/ZenSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767239,"owners_count":20992548,"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":["c-sharp","nemerle","resharper","resharper-plugin"],"created_at":"2024-10-03T10:41:31.038Z","updated_at":"2025-04-08T03:19:11.130Z","avatar_url":"https://github.com/ulex.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"ReSharper ZenSharp plugin\n==============\n\nA shortcuts language for defining [ReSharper](https://www.jetbrains.com/resharper/) live template items. You can\nspecify your own live template scheme using flexible language.\n\n![example1](https://raw.githubusercontent.com/ulex/ZenSharp/master/doc/screen1.gif)\n\n![example2](https://raw.githubusercontent.com/ulex/ZenSharp/master/doc/screen2.gif)\n\nHow do I get it?\n---\nYou can install directly into ReSharper via the Extension Manager in the\nReSharper menu.\n\nPredefined templates\n---\nZenSharp shipped with a lot of standard templates.\n\n`$END$` means cursor position after expand template by pressing Tab.\n\n**Examples** in scope, where method definition is allowed:\n\n\u003c!-- btw: «how to memo» really non readable markdown, sorry :) --\u003e\n| shortcut | expand to                                              | how to memo                                                                 |\n|----------|--------------------------------------------------------|-----------------------------------------------------------------------------|\n| pps      | `public string $name$ { get; private set; } $END$`     | **p**ublic **p**roperty **s**tring                                          |\n| ppsAge   | `public string Age {get; private set;} $END$`          | **p**ublic **p**roperty **s**tring Name                                     |\n| pps+     | `public string $name$ { get; set; } $END$`             | **p**ublic **p**roperty **s**tring more access!                             |\n| ppsA+p   | `public string A {get; protected set;} $END$`          | **p**ublic **p**roperty **s**tring more access!**p**rotected                |\n| \\_rs     | `private readonly string $name$; $END$ `               | [**_** is private] **r**eadonly **s**tring                                  |\n| pvm      | `public virtual void $name$($END$) { } `               | **p**ublic **v**irtual **m**ethod                                           |\n| pM\\~s     | `public static IEnumerable\u003cstring\u003e $name$($END$) { } ` | public [static **M**ethod] _returning_ [**\\~** is IEnumerable] of **s**tring |\n| pamb     | `public abstract bool $name$($END$) { } `              | **p**ublic **a**bstract **m**ethod **b**ool                                 |\n| pmiaTest | `public int[] Test() { $END$ }`                        | **p**ublic **m**ethod _returning_ **i**nt **a**rray Name                    |\n\n\n\n**Examples** where type declaration is allowed:\n\n| shortcut | expand to                                | how to memo                     |\n|----------|------------------------------------------|---------------------------------|\n| pi       | `public interface $name$ { $END$ }`      | **p**ublic **i**nterface        |\n| psc      | `public sealed class $name$ { $END$ }`   | **p**ublic **s**ealed **c**lass |\n| pc:t     | `public class $name$ : $type$ { $END$ }` | **p**ublic  **c**lass **:t**ype |\n| ie       | `internal enum $name$ { $END$ }`         | **i**nternal **e**num           |\n\n**Hint**: you can always write variable name after shortcut. For example, you can type `ppsPropertyName` and\nby pressing tab it magically expand to `public string PropertyName {get; set; }`.\n\n\n#### Access\n| shortcut | expand to |\n|----------|-----------|\n| p        | public    |\n| _        | private   |\n| i        | internal  |\n| P        | protected |\n\n\n#### Types\n| shortcut | expand to | note                                            |\n|----------|-----------|-------------------------------------------------|\n| t        | $type$    | ask user for custom type after expand           |\n| sa       | string[]  | any prim type end with `a` — array of this type |\n| b?       | bool?     | any prim type end with `?` — Nullable type      |\n\n\n##### Primitive types\n| shortcut | expand to |\n|----------|-----------|\n| s        | string    |\n| by       | byte      |\n| b        | bool      |\n| dt       | DateTime  |\n| d        | double    |\n| i        | int       |\n| ui       | uint      |\n| g        | Guid      |\n| dc       | decimal   |\n| b?       | bool?     |\n\n\n##### Generic types\n| shortcut | expand to       |\n|----------|-----------------|\n| l        | IList\u003cT1\u003e       |\n| ~        | IEnumerable\u003cT1\u003e |\n| sl       | SortedList\u003cT1\u003e  |\n| di       | Dictionary\u003cT1\u003e  |\n\n##### NUnit attributes #####\nSome useful examples to help wring NUnit tests:\n[repo](https://github.com/ulex/ZenSharp/blob/master/ZenSharp.Integration/Templates.ltg) today)\n\n\n| shortcut               | expand to                                                   |\n|------------------------|-------------------------------------------------------------|\n| **su**pmSetup          | `[SetUp] public void Setup() { $END$ }`                     |\n| **tfsu**pmFixtureSetup | `[TestFixtureSetUp] public void FixtureSetup() { $END$ }`   |\n| **tftd**FixtureDown    | `[TestFixtureTearDown] public void FixtureDown() { $END$ }` |\n| **td**pmTearDown       | `[TearDown] public void Test() { $END$ }`                   |\n| **tc**pmTest           | `[TestCase] public void Test() { $END$ }`                   |\n| **t**pmTest            | `[Test] public void Test() { $END$ }`                       |\n\nRules\n---\nSimplest rule for expand text `cw` into `System.Console.WriteLine($END$)`(this\nrule is ordinary ReSharper live template) will looks like `start ::=\n\"cw\"=\"System.Console.WriteLine($END$)\"`\n\nMore complex rule, a sort of predefined live template for define class in scope,\nwhere class declaration is allowed. In ordinary live templates, if you want to\nspecify class access before executing live template, you must define\nindependent live templates one for `\"public class\"`=`pc`, another for `\"internal class\"=ic`\nBut class can be also be sealed. Or static. And same access modifier can be\napplied to interface and enum.\n\nIn ZenSharp config you can simple define rules like formal grammar.\nFor class declaration this definition will looks like:\n\n    space  ::= \" \"\n    cursor ::= \"$END$\"\n    identifier ::= \u003cname default=\"$name$\" macros = \"complete()\"\u003e\n\n    access ::= (internal=i | public=p | private=_ | protected=P) space\n    class  ::= access [\"sealed \"=s] (\"class\"=c | \"static class\"=C) space body\n    body   ::= identifier \"{\" cursor \"}\"\n\n    scope \"InCSharpTypeAndNamespace\"\n    {\n      start = class | interface\n    }\n\nMore complex example available in predefined templates file.\n\nHow to compile\n---\nZenSharp written in C# and Nemerle programming language. You can install it from Nemerle website http://nemerle.org/Downloads .\nZenSharp depend on nuget packages ReSharper.SDK and nunit.framwork. Use nuget package restore for them.\n\nAfter this, ZenSharp can be built either msbuild or Visual Studio.\n\nExternal links\n---\nhttps://blog.jetbrains.com/dotnet/2015/12/22/end-of-year-round-up-of-resharper-10-extensions/\nhttps://garyng.github.io/gtil-gitbook/ReSharper/resharper-plugin-zensharp.html\n\n\n\u003c!--\nHOW TO UPGRADE:\n1. Update ZenSharp.Integration/ZenSharp.Integration.csproj ReSharperSDK and Lifetime to latest version (from visual studio)\n2. Update release notes in ZenSharp.nuspec\n3. Update version spec in buildNuPack.ps1\n4. Check compilation in Visual Studio\n5. Build package by running build.bat\n6. Install and check plugin\n7. Push to plugins.jetbrains.com via marketplace\n8. Commit and push this repo\n\nvim:tw=140:spell:\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulex%2Fzensharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulex%2Fzensharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulex%2Fzensharp/lists"}