3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
EditorConfig 當一個團隊進行一個專案開發時,Coding Style 是最頭痛的一件事,常常依靠許多工具及流程才有辦法防治。與其透過外部防治,不如先從自己做起。 EditorConfig 就是專門解決這種問題的,只要在專案加上 .editorconfig 設定檔就可以協助解決 Coding Style 的問題。 Installation Notice:EditorConfig 在一些編輯器是預設就有的,本篇是以 Vim 為例,因此需要另外安裝。 EditorConfig 可以透過 Vundle 安裝在 Vim 裡。 .vimrc Plugin 'editorconfig/editorconfig-vim' Install :PluginInstall Config .editorconfig 是一個 INI 格式檔 的設定檔,可以定義針對被套用的路徑或副檔名格式的需求。 基本範例 ; 專案最上層的設定檔 root = true [*] ; 縮排類型 indent_style = space ; 縮排長度 indent_size = 4 ; 副檔名為 .php 的設定 [*.php] indent_style = space indent_size = 4 [*.css] indent_style = space indent_size = 2 [*.scss] indent_style = space indent_size = 2 [*.sass] indent_style = space indent_size = 2 [*.js] indent_style = space indent_size = 2 Categories: Vim Tags: EditorVim 分類 Android AngularJS API Blueprint Chrome Database MySQL DataStructure Docker Editor Vim Firefox Git GitLab Google API Hadoop Language Go Java JavaScript jQuery jQueryChart Node.js Vue PHP Laravel ZendFramework Python Mac Network Cisco DLink Juniper Oauth Server Apache Share Unix FreeBSD Linux WebDesign Bootstrap CSS HTML Wordpress Search 搜尋關鍵字:

本文由blogjohnsonluorg提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦