Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

其他格式檔案 #4

Open
bblurock opened this issue Oct 27, 2014 · 6 comments
Open

其他格式檔案 #4

bblurock opened this issue Oct 27, 2014 · 6 comments
Assignees

Comments

@bblurock
Copy link
Contributor

  1. HTML
  • 純 HTML 使用 four spaces。
  • Joomla! 內部的 html.php 維持 tab
  1. JSON
  • 使用 four spaces
  • 括號不換行
  1. YAML
  • 使用 four spaces
  1. CSS & LESS
  • 使用 four spaces
  • 換行維持一般換行
  1. XML
  • 使用 four spaces
  1. SQL
  • 使用 four spaces
  1. Twig
  • 使用 four spaces
@asika32764
Copy link
Contributor

後續可以繼續補上

Code Style 設定檔由@LeoOnTheEarth 協助更新

@LeoOnTheEarth
Copy link
Contributor

我試過 .editorconfig
在 PHPStorm 裝 EditorConfig 的 plugin 就會馬上套用在專案中

只是有個缺點是他能設定的部分只在縮排而已
沒辦法做一些換行之類的設定

還是直接更新 PHPStorm 的 XML 設定會比較好

@asika32764
Copy link
Contributor

@LeoOnTheEarth PHPStorm 8.0.2 有多一個 JSON Style,要一起設定一下,不然他的預設值是 2 spaces,我們的其他檔案會亂掉

preferences

@asika32764
Copy link
Contributor

我前的設定

preferences
preferences
preferences
preferences

@LeoOnTheEarth
Copy link
Contributor

OK, 不過 Continuation Indent 應該也要是 4

@LeoOnTheEarth
Copy link
Contributor

使用 https://github.com/smstw/sms-phpstorm-config-installer 來更新 codestyle 設定吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants