天天看點

Java學習 | IDE入門使用 | IDEA入門使用

裝機必備

  • 改主題:Settings - Appearance - Theme
  • 設定快捷鍵為Eclipse模式:Settings - Keymap - 最上面的下拉清單中可以選Eclipse
  • 設定Ctrl + Mouse Wheel改變字型大小

    Settings - Editor - General - 右邊Mouse Control - 勾選Change font size with Ctrl + Mouse Wheel

  • 提示不區分大小寫:Settings - Editor - General - Code Completion - 取消勾選Match Case
  • 設定預設字型大小:Settings - Editor - Font
  • 設定注釋的字型顔色為綠色

    Settings - Editor -Color Scheme - Java - Comment

  • 設定Tab為一個字元而不是四個空格:Settings - Editor - Code Style - Java - Tabs and Indents - 勾選Use tab character

    Block Comment 塊注釋;Line Comment 行注釋;Java Doc 文檔注釋

  • 設定Ctrl + /注釋後加空格

    Settings - Editor - Code Style - Java - 橫欄中的Code Generation - Comment Code

    取消勾選Line comment at first column;勾選Add a space at comment start

  • 取消輕按兩下shift全局搜尋的快捷鍵

    關閉IDEA,打開安裝目錄 - lib - platform-impl.jar - 用壓縮軟體打開 - idea - PlatformActions.xml拖到桌面 - 改成txt檔案後打開 - 搜尋com.intellij.ide.actions.SearchEverywhereAction - 把這一行注釋掉(<!-- -->) - 改回.xml檔案拖回壓縮包覆寫原檔案

快捷鍵

  • 快捷鍵的檢視與設定:Settings - Keymap
    • 最上面的下拉清單中可以選Eclipse
    • 右邊的搜尋框可以搜素功能,也可以搜素快捷鍵(點Find Action by Shortcut)
  • 基操:全選、剪切、複制、粘貼、儲存、查找、注釋、選中單詞、選中整行
  • 運作:Ctrl + F11
  • 删除一行:Ctrl + D
  • 自動補全:Alt + /
  • 複制本行粘貼到下一行:Ctrl + Alt + 下箭頭
  • 格式化代碼:Ctrl + Shift + F
  • 多行編輯:按住Alt鍵的同時滑鼠左鍵按住拖動