AdSense

網頁

2020/12/23

IntelliJ IDEA 調整縮排設定 indent format setting

IntelliJ IDEA 調整縮排設定的方式如下。

在上方功能選單選擇File -> Settings...,或按Ctrl + Alt + S(Windows) | + ,(macOS)開啟偏好設定(Settings/Preferences)。

在左測選擇Editor -> Code Style -> Java,然後在右側的[Tabs and Indents]設定找到[Indent]欄位即可修改縮排的空格數及選擇用tab或space縮排。


注意IntelliJ IDEA預設會自動偵測編輯文件的縮排情況來決定縮排格式,此時會蓋過上面的設定,除非重新整理整份文件的格式。或在Editor -> Code Style取消勾選[Detect and use existing file indents for editing]來停用自動偵設縮排功能。


沒有留言:

AdSense