<p id="g32nn"></p>
    1. <acronym id="g32nn"><strong id="g32nn"></strong></acronym>
      <pre id="g32nn"></pre>

      <table id="g32nn"><option id="g32nn"></option></table>

          VS Code 和 WebStorm的基礎配置
          2022-09-06 22:45:01

          一, cocos標準

          git環境,配置自動換行false

          git config --global core.autocrlf false

          這一步是為了在windows環境下 文件結束符保持 , 否則cocos 中的meta文件在刷新時會因為 而產生變更記錄,影響提交列表.

          二, VS Code

          1, 格式化工具插件: Prettier - Code formatter

          配置如下:

          //tab縮進"

          prettier.tabWidth":?4,

          //代碼行長度"

          prettier.printWidth":?100,

          //ctrl -s 自動格式化"

          Editor:Format On Save":?true

          2, 保持換行符為:

          File-> Preferences -> Text Editor => Eol:

          VS Code 和 WebStorm的基礎配置_git

          這一步保證ide新建/修改文件也是以 結尾,而非 , 因為git提交時的自行換行轉換已被關閉,所以代碼中的 不會被轉換成 .

          3,?文件編碼設置: utf-8

          Preferences -> Text Editor => Encoding: utf8

          ? ?4,?去掉.meta的顯示

          a,?Files:Exclude

          VS Code 和 WebStorm的基礎配置_git_02

          b, Search:Exclude

          VS Code 和 WebStorm的基礎配置_格式化_03


          三, WebStorm

          1,?保持換行符為:

          File->Settings -> Editor/CodeStyle -> ?General ==> Line separator : ?

          VS Code 和 WebStorm的基礎配置_格式化_04

          2,?文件編碼設置: utf-8

          ?File->Settings -> Editor/File Encodings=> ?Global Encoding:UTF-8, ProjectEncoding:UTF-8,Default encoding for propertities file: UTF-8

          VS Code 和 WebStorm的基礎配置_格式化_05

          3, 使用VS Code的格式(沒辦法,很多同事喜歡用VS Code)

          3.1,?定義方法后和括號之間無空格

          ?code style?->?Javascript?->?Space?->?Before Parentheses?-> 取消勾選?Function declaretion parentheses?和?In function expression

          VS Code 和 WebStorm的基礎配置_mate_06

          3.2,?對象花括號和中間鍵值需要有空格

          code style?->?Javascript?->?Space?->?Within?-> 勾選Object literal braces

          VS Code 和 WebStorm的基礎配置_mate_07

          4, 去掉.meta的顯示

          File->Settings -> Editor -> File Types -> Ignored Files and Folders

          VS Code 和 WebStorm的基礎配置_mate_08

          本文摘自 :https://blog.51cto.com/a


          更多科技新聞 ......

          97久久久久人妻精品专区_国产成人精品视频导航_国产色诱视频在线播放网站_97午夜理论电影影院
          <p id="g32nn"></p>
          1. <acronym id="g32nn"><strong id="g32nn"></strong></acronym>
            <pre id="g32nn"></pre>

            <table id="g32nn"><option id="g32nn"></option></table>