Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 2.74 KB

navigation_through_code_Intellij.md

File metadata and controls

49 lines (38 loc) · 2.74 KB

Theory: Navigation through code

It is pretty hard to remember all the shortcuts and all the actions and productivity boosters IntelliJ IDEA has. However, don't worry about that. All you need to remember is the one action that rules them all, Help | Find Action command (⌘ ⇧ A / Ctrl + Shift + A). Just start typing the action you need, and you will get the list:

  • 모든 shortcuts 와 actions 를 기억하기는 현실적으로 힘들다. 그래서 Intellij 에서는 Action 을 찾을 수 있는 모달(?) 을 제공해줄 수 있다.
  • 이것을 볼려면 Mac 기준 Command + shift + a 키를 누르면 볼 수 있다. (여기선 모두 맥 기준으로만 설명하겠다.)

Code search

IntelliJ IDEA lets you find and replace text strings in an active editor.

Search through the current file

  • From the main menu, choose Edit | Find | Find, or press ⌘ F / Ctrl + F. The search pane appears at the top of the active editor.
  • If necessary, specify the search options.
  • In the search field, start typing the search string

As you type, the first occurrence of the search string after the current cursor position is selected; the other occurrences are highlighted in the editor. In addition, the matching occurrences are marked in the right gutter with stripes.

  • To search for a multi-line fragment, click in the search box.
  • Explore the search results.

Replace in the current file

  • From the main menu, choose Edit | Find | Replace, or press ⌘ R / Ctrl + R. The search and replace pane appears on top of the active editor.
  • If necessary, specify the search and replace options.
  • In the search field, start typing the search string. As you type, the matching occurrences are highlighted in the editor, and a Replace pop-up dialog box opens at the first occurrence, suggesting to replace the current occurrence, or all of them, with an empty string.
  • Start typing the replacing string.
  • Explore the search results, and, using the buttons of the replace dialog box, replace occurrences as required.
  • command + f 로 찾고 command + r 로 바꿀 수 있다는 대충 그런 이야기

Navigating to Class, File, or Symbol by Name

On the main menu, point to Navigate, and then choose Class, File, or Symbol respectively, or use the following shortcuts:

Class: ⌘ O / Ctrl + N File (directory): ⌘ ⇧ O / Ctrl + Shift + N Symbol: ⌘ ⌥ O / Ctrl + Shift + Alt + N In the pop-up window, start typing the desired name. So, you can enter characters located anywhere inside the desired name. As you type, the suggestion list shrinks, displaying the matching names only.

  • Class 를 찾고 싶다면 Command + O
  • File 을 찾고 싶다면 Command + shift + o
  • Symbol 를 찾고 싶다면 command + option + o