IntelliJ IDEA 2017.3 Help

Using Intellij IDEA editor

IntelliJ IDEA lets you quickly find your way around the editor, manage editor tabs, navigate through the code, and perform various editing actions.

Get familiar with the editor environment

  • To quickly switch schemes, keymaps, or view modes, press Ctrl+Back Quote. In the Switch menu, select your option and press Enter. Use the same shortcut to undo your changes.
    You can also find and adjust the Color Scheme and Keymap settings in File | Settings/Preferences | Editor | Color Scheme and the keymap in File | Settings/Preference | Keymap.
  • To maximize editor pane, press Ctrl+Shift+F12.
  • To return to an active editor from other windows, press Escape.
  • To return to an editor from the command-line terminal, press Alt+F12. However, note that in this case IntelliJ IDEA closes the terminal window.
    To keep the terminal window open when you want to switch back to an active editor, press Ctrl+Tab.
  • To manage tool windows, use the following actions:
    • To hide all windows, press Ctrl+Shift+F12. In this case only the editor you currently work in is open.
    • To return to a default layout, press Shift+F12. In this case IntelliJ IDEA hides the Project tool window. However, you can select Window | Store Current Layout as Default to save the current layout you are working in as default and use the same shortcut to restore it.
    • To jump to last active window you have used, press F12.

Navigate inside the editor

IntelliJ IDEA lets you navigate inside the editor using the following actions:

  • Line numbers -
    • To permanently show line numbers in the editor, select File | Settings/Preferences | Appearance and from the options on the right, select the Show line numbers. You can also assign a shortcut to the Show line numbers action.
    • To navigate to a line or a column that you need in the editor, press Ctrl+G, in the dialog that opens, specify the information and click OK.
  • Cursor position and edit location -
    • To find current cursor location in the editor, press Alt+Q. It might be helpful if you have a large project and do not want to scroll through the file.
    • To find a previous cursor position, press Ctrl+Alt+Left.
    • To navigate to the last edited location, press Ctrl+Shift+Backspace.
    • To show the list of recently edited files, press Ctrl+Shift+E.
  • Lens mode -
    To use lens mode in the editor and make it available on a mouse hover, press Ctrl+Alt+S to open the Settings dialog. From the options on the left, select Editor | General | Appearance. From the options on the right, select the Show code lens on the scrollbar hover. Alternatively, while in the editor, right-click the code analysis marker, and from the context menu select the same option.
  • Breadcrumbs -
    • To navigate to a specific element in the source code, click the breadcrumb with its name.
    • By default, breadcrumbs are enabled and displayed at the bottom of the editor.
    • To change the location of breadcrumbs, right-click a breadcrumb, from the context menu select Breadcrumbs and the location preference.
    • To edit breadcrumbs settings, press Ctrl+Alt+S and on the page that opens, select Editor | General | Breadcrumbs.
      You can uncheck the Show HTML breadcrumbs option to hide the appearance of breadcrumbs in the editor.

Manage editor tabs

IntelliJ IDEA lets you manage the open tabs in the editor, close, hide, and detach them. Every time you open a file for editing, a dedicated tab is added to the editor window, next to the active editor tab.

  • To close all of the opened tabs, select Window | Editor Tabs | Close All on the main menu.
  • To close only inactive tabs, press Alt and click the /help/img/idea/2017.3/close1.png icon on the active tab. To close only the active tab, press Ctrl+F4
  • To detach a tab, drag the tab you need outside of the main window (drag the tab back to attach it) or press Shift+F4.
  • IntelliJ IDEA limits number of tabs that you can simultaneously open in the editor simultaneously (the default tab limit is 10). To prevent closing editor tabs automatically after the number of editor tabs reaches its limit, press Ctrl+Alt+S and select Editor | General |Editor Tabs. From the options on the right, in the Tab closing policy section, adjust the settings according to your preferences and click OK.
  • To switch between tabs, press Ctrl+Tab.
  • To place an editor tabs in different parts of the editor or remove them, select Window | Editor Tabs | Editor Placement from the main menu and select the appropriate option.
  • To sort editor tabs, select Window | Editor Tabs | Sort Tabs by File Name from the main menu.

Edit code

IntelliJ IDEA lets you performs simple and complex editing procedures.

  • Code selection -
    • To extend the selection of your code (for plain text and comments the selection starts within the whole word then moves to next word, sentence, etc.; for lines of code the selection starts with argument, extends to group of arguments then all arguments inside method call), press N/A.
    • To shrink the code selection, press Ctrl+Shift+W.
    • To make a multiselection of your code, press Shift+Alt and double-click the left mouse button. Alternatively, press Alt+J then press the sake key again to find the matching occurrence in the file.
    • To highlight braces, place the caret immediately after the block closing brace/bracket or before block opening brace/bracket.
    • To copy reference of a line or symbol, place the caret on a certain line or symbol and press Ctrl+Shift+Alt+C. Use Ctrl+V for pasting.
    • To paste from history, press Ctrl+Shift+V, in the dialog that opens select your entry and click Paste. You can configure the depth of the clipboard stack in the Limits section located in File | Settings/Preferences | Editor | General. When the specified number is exceeded, the oldest entry is removed from the list.
    • To undo or redo your changes, press Ctrl+Z or Ctrl+Shift+Z respectively.
  • Lines and blocks -
    • To use multicursor

Reformat and rearrange code

Use quick pop-ups


Configure file encoding

Use editor settings

Last modified: 11 October 2017