ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

CSharpier

by mkonstapel ALL

Small Sublime Text plugin that adds a command to run dotnet-csharpier on C# files

Labels formatting

Details

Installs

  • Total 184
  • Win 131
  • Mac 23
  • Linux 30
May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22
Windows 1 0 1 0 0 2 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 2 0 1 1
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
Linux 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text CSharpier plugin

Small plugin that adds a command to run dotnet-csharpier on C# files.

CSharpier is an opinionated code formatter for C#.

You can invoke the formatter manually from the command menu, “CSharpier: format file”. You can also configure the plugin to run automatically on save by editing the package settings (Preferences/Package Settings/CSharpier):

{
    "format_on_save": true,
}

Note that the command is only visible, and runs on save, when used on C# files.

Thanks to @thijsdezoete's isort plugin for providing a convenient starting point!

Install

To install csharpier: dotnet tool install csharpier -g.

dotnet is part of the .NET CLI, included in the .NET SDK.

Package Control

Hopefully soon: in @wbond's Package Control. Until then, open the command menu (default ctrl-shift-p), choose Package Control: Add Repository and paste in the repo URL: https://github.com/mkonstapel/sublime-text-csharpier-plugin.

To install the package, choose Package Control: Install Package from the command menu and search for csharpier.

Manual package installation

Clone this repository from your Sublime packages directory:

Linux

$ cd ~/.config/sublime-text/Packages
$ git clone https://github.com/mkonstapel/sublime-text-csharpier-plugin

OSX (untested)

$ cd "~/Library/Application Support/Sublime Text/Packages"
$ git clone https://github.com/mkonstapel/sublime-text-csharpier-plugin

Windows

$ cd "%APPDATA%\Sublime Text\Packages"
$ git clone https://github.com/mkonstapel/sublime-text-csharpier-plugin