LinLiuLY / IntellijTricks

Intellij Tricks https://www.udemy.com/intellij-idea-secrets-double-your-coding-speed-in-2-hours/learn/v4/t/lecture/4599722?start=0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IntellijTricks

Intellij Tricks https://www.udemy.com/intellij-idea-secrets-double-your-coding-speed-in-2-hours/learn/v4/t/lecture/4599722?start=0

Intellij Tricks

Editing and working with code

Move lines and statements

  • move line down: command + shift + down
  • move statement up: command + shift + up

Duplicating and Deleting line

  • duplicate current line: command + d
  • delete current line: command + x

View parameter information

  • view suggested parameters of a method: command + p

Commenting and block commenting code

  • comment or uncomment current selection: command + /
  • block comment or uncomment current selection: command + shift + /

Folding and expanding code

  • fold current code block: command + '-'
  • expand current code block: command + '+'

Code Navigation

Navigation between texts

  • scroll page up fn + up
  • scroll page down fn + down
  • move to the first line of the code fn + cmd + left
  • move to the last line of the code fn + cmd + right

Navigate to Class: command + o

  • partial match
  • camel humps
  • wildcard search

Navigate to Back: command + [

Navigate to Symbol: alt + command + o

Navigate to File

  • navigate to file: command + shift + o
  • type file name or file path to look up files
  • type folder name with '/' in the end to look for folders

Navigate to Action

  • navigate to the desired action: command + shift + a

Search Everywhere: shift + shift

  • to move between sections in search everywhere window tab

Search usage command + B

Tabs

  • navigate to recent files: command + e
  • navigate to recent edited files: shift + command + e

Code Selection

  • extend selection: alt + up/down

  • select one word at a time shift + alt + left/right

  • select the beginning to end shift + command + left/right

  • select the next occurrence: ctrl + g

  • unselect the next occurrence: shift + ctrl + g

Code Completion

Smart Code Completion: alt + Enter shift + control + space

  • after the new keyword in an object declaration
  • in the list of parameters of a method call
  • in return statements

Postfix Completion

  • display postfix completion suggestion list: command + j
  • check expression to be null: null
  • check expression not to be null: nn/notnull
  • insert try-catch block: try

Code Generation

  • display generate menu in class file: command + n
  • display generate menu in test class: command + n

Code Style

code reformat

  • reformat current selection or current file: alt + command + l

code optimize

  • optimize import statements: alt + ctl + o
  • enable Optimize imports on the fly to automatically optimize imports after each change

navigate to compilation error

  • build the application: command + F9
  • navigate to next compilation error: alt + command + down
  • navigate to previous compilation error: alt + command + up
  • esc to move the cursor to editor

Language Injection

  • add language injection: alt + enter
  • close current fragment editor or current file: command + W

Git

  • open the git manual ctl + v
  • commit project command + k
  • revert a file alt + command + z
  • show diff command + D

About

Intellij Tricks https://www.udemy.com/intellij-idea-secrets-double-your-coding-speed-in-2-hours/learn/v4/t/lecture/4599722?start=0