Shift pressed twice Composite search, can search for file name, class name, variables, methods, etc.Ctrl + Shift + N Locate / Open files or directories by file name. Add a forward-slash to the end of the input to open a directory.Ctrl + Shift + F Search for files containing specified content across entire project or specific directories.Ctrl + Shift + R Replace specified content across entire project or specific directories.Ctrl + F Find text in current file.Ctrl + R Replace text in current file.Ctrl + N Find class file based on the input class name.Ctrl + F12 Display structure of current file. Can filter using input on pop-up layer.Ctrl + Z Undo.Ctrl + Shift + Z Redo.Ctrl + Y Delete current line or selected lines.Ctrl + D Copy the current line or selected text and insert it below the current line.Ctrl + / Comment out the current line.Ctrl + Shift + / Comment out the selected code block.Alt + Insert Auto-generate code, such as setObject/getObject methods, constructors, toString(), etc.Ctrl + J Insert code template.Ctrl + F4 Close current editing file.Ctrl + Tab Switch between editing windows. Pressing delete during the switching process closes the selected window.Ctrl + Alt + L Format code.Ctrl + Alt + O Optimize imports by deleting unused imports.Ctrl + Shift + F12 Maximize the editor.Shift + F6 Rename file/folder.Ctrl + Alt + Left Arrow Return to previous editing location.Ctrl + Alt + Right Arrow Go back to previous editing location.Ctrl + E Display list of recently opened files.Ctrl + P Display documentation for parameters.Ctrl + Q Display documentation for the variable/class/method above the cursor (can also be done during auto-suggestion).Alt + Enter Offer quick fix based on the problem at the cursor position.Ctrl + G Go to line in current fileCtrl + U Go to definition of method or interface in parent classCtrl + B Go to implementation of method/variable or interface definition under cursorCtrl + Left Click Same as Ctrl + BF2 Go to the next highlighted error or warning locationCtrl + Alt + F7 Show usageCtrl + K Commit changesCtrl + T Update projectAlt + ` Show version control popup menuCtrl + Alt + S Open system settingsCtrl + Shift + C Copy current file path to clipboardShift + F9 Debug current projectShift + F10 Run current projectF11 toggle full screenCtrl + Shift + P , F1 Show command panelCtrl + P Jump to fileCtrl + B Toggle sidebar visibilityCtrl + Shift + E Show Resource ControlCtrl + Shift + G Show git controlCtrl + Shift + D Show debuggingCtrl + Shift + X Show extensionsCtrl + Shift + U Show output panelCtrl + Shift + V Open markdown previewShift + F11 Open zen modeCtrl + ` Open terminalCtrl + Shift + ` Add new terminalCtrl + Shift + N Create new windowCtrl + Shift + W Close windowCtrl + K Ctrl + S Show keyboard shortcutsCtrl + \ Split compilerCtrl + 1/2/3 Focus on first, second, third compilerCtrl + F Current file searchCtrl + H Current file search replaceCtrl + Shift + F Search within folderCtrl + Shift + H In-folder search and replaceCtrl + Shift + [ Collapse areaCtrl + Shift + ] Expand areaCtrl + / Toggle line commentsShift + Alt + A Toggle block commentsCtrl + G Go to lineShift + Alt + F Format fileCtrl + K Ctrl + F Format selectionF12, Ctrl + Left mouse button Go to definitionCtrl + S SaveCtrl + Shift + S Save asCtrl + Shift + M Show problem panelCtrl + Shift + Tab Show browsing historyCtrl + Space Trigger suggestionsCtrl + Shift + Space Triggers parameter hintsF9 BreakpointF5 Start/continue debuggingShift + F5 StopShift+F11 StepF10 Step throughi insert at cursor position:n position the cursor on line nShift + H positions the cursor to the first character of the first lineShift + L Position the cursor to the first character of the last lineu Undoes the last editShift + U Undoes the entire line of the current cursorCtrl + r Restore the initial file statee! Undoes all changes and restores the file to the state it was in when it was openeddd Delete the current line:1,$d Delete all linesyy Copy the current linep Paste the last copy at the current cursor:/text search for text from top down, press n to search down, press N to search forward:?text Find text from bottom to top, press n to search down, press N to search forward:s/old/new Find the first occurrence of old and replace it with new:s/old/new/g Find all occurrences of old and replace them with new (current screen):%s/old/new/g Replace all olds in the entire file:%s/old/new/gc Replace all olds in the entire file, but ask if they are replaced at each occurrence:n,ms/old/new/g Replaces all olds between line numbers n and mPress ESC first and then operate the shortcut keys that follow.
:w Write but do not exit:w! Force save but don’t exit:q! Exit but not save:wq Save write and exit:w file Save the current file contents to a file:qa! Quit all files without saving, e.g., if multiple files are open:set ignorecase Ignore case lookup:set noignorecase Do not ignore case lookups:set hlsearch Highlight search results:set nohlsearch Turn off highlighting of search results:set number Show line numbers:set nonumber Don’t show line numbers