2008/02/27

Eclipse shortcut


  1. 找配對的右括號(block寫太長時,很好用):在左括號的後方按 ctrl+shift+p,便會自動跳到右括號後方。

  2. 每次回來寫程式,都忘了哪些code是需要implement or enhancement,這時候可以用//TODO 來標記,之後便可利用Tasks Panel列出Todo list,方便maintain程式。

  3. ctrl+shift+上下鍵,可以一次跳一個member or function (Mac: command + shift +上下鍵)

  4. ctrl+上下鍵 跟滑鼠中間滾輪差不多

  5. ctrl+左右鍵 游標一次跳一個word (Mac: alt +左右鍵)

  6. ctrl+ alt + r 可以更改變數名字 (Mac: 我習慣把它改成 command + r )

  7. ctrl + k 找下一個選取字串 (Mac: command + K)

  8. ctrl + shfit + 左右鍵 可以快速選取變數 or statement (Mac: alt + shift + 左右鍵)

  9. alt + 左右鍵 可以返回前一個游標處 (Mac: command + [ ])

  10. alt + / word completion (Mac: 我習慣把word completion 改成 ctrl + . | content assist改成command + .)

  11. ctrl + / comment (Mac: command + /)

  12. ctrl + shift + / comment block 

  13. ctrl + shift + \ uncomment block

  14. ctrl + l jump to the designated line (Mac: command + L )

  15. ctrl + F6 or ctrl + E Next editor 就是常常習慣用的switch tabs,我習慣把它改成ctrl + tab (Mac: ctrl + fn + 上下鍵,我習慣用BetterTouchTool把它mapping 到three fingers swipe)

  16. F3 jump to declaration (Mac: fn + F3)

  17. ctrl + alt + H open call hierarchy (Mac: ctrl + alt + H, 我習慣改成command + alt + H)

  18. F4 open hierarchy and outline view

  19. ctrl + O quick outline (Mac: command + O )

  20. ctrl +1 參考eclipse 提供的修改意見(有紅色或黃色底波線highligh的variables) (Mac: command + 1)

  21. ctrl + shift + L open hotkey menu (Mac: command + shift + L)

  22. alt + shift + S show the source menu (等於在variable上按右鍵)

  23. syso alt+ / template for System.out.println();

  24. ctrl + shift + X 將選取的英文改成大寫 (Mac: command + shift + X)

  25. ctrl + shift + Y 將選取的英文改成小寫 (Mac: command + shift + Y)

  26. Mac: command + shift + R Search File in project

  27. ctrl + D delete current line (Mac: command + D)

  28. ctrl + Q Jump to last edit point

  29. ctrl + J Search as you type. At first it won’t seem that anythings happening. But just type something and you’ll start searching. Hit ESC to cancel. (Mac: command + J)
  30. Mac: command + shift + F Pretty format selected code block.

No comments:

Post a Comment