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 329
  • Win 232
  • Mac 43
  • Linux 54
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 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5
Windows 1 0 0 0 0 0 0 0 0 2 0 1 1 0 0 0 0 0 0 0 0 0 0 0 2 0 1 1 0 0 0 0 1 0 0 1 0 1 1 1 0 0 0 0 2
Mac 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 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 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