Flet / SublimeLinter-contrib-semistandard

MIT License
13 stars 6 forks source link

Semistandard automatically format code --format support #2

Closed joseluisq closed 9 years ago

joseluisq commented 9 years ago

-F --format Automatically format code. (using standard-format)

In user shortcut

{ "keys": ["ctrl+alt+f"], "command": "semistandard_format" }
ahmadnassri commented 9 years ago

:+1:

Flet commented 9 years ago

This can be accomplished via @bcomnes StandardFormat on package control.

1) Make sure you have at least semistandard version 4.2.2... just update to the latest to be sure:

npm install semistandard -g

2) Install StandardFormat from package control 3) Open the "user" package settings for "Standard Format"

4) Add a reference to semistandard -F --stdin:

{
  // set this to false if you don't want to format on save
  "format_on_save": true,
  "command": ["semistandard", "-F", "--stdin"],
}

5) Save the settings file. 6) Restart Sublime Text.

StandardFormat will also map CTRL+ALT+F to format automatically. :)

Flet commented 9 years ago

added this text to install.txt and to README.md

joseluisq commented 9 years ago

Great ! :+1: