官术网_书友最值得收藏!

Tips and Tricks

They are several key bindings and tools that we can use to improve our products using IntelliJ, let's review some of them.

IntelliJ provides a full range of key bindings for most of the tasks, please have a look at them at this link: https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf.

Execute an action: Shift + Ctrl + A on Windows, shift + command + a on MacOS. This will allow us to execute any action in the tool, for example, Run, View Maven projects, Save the file, and so on.

Search everywhere: Double Shift. This will have a window that allows us to search for everything, from file names to actions, and so on. The search is quite powerful, for example, if we want to open our class, ExampleService we can just type ES in capitals.

Paste from history: Shift + Ctrl + V on Windows, shift + command + v on Mac OS, it will display a window with a history on our clipboard.

Iterations and quick-fixes: Alt + Enter. This is probably the most powerful tool; many times, we can see a light bulb on the editor, using this key binding where it is will fold options for this, from removing unused imports, to simplify lines of code. Try to experiment with it.

Some quick-fix options

Rename: Shift + F6. This will rename anything, from a class name to a file, or even a package, and will also change the code that was using that name; for example, if we rename a function, every call to that function will be renamed.

Refactor this: Shift + Ctrl + Alt + T on Windows, control + T on MacOS, is a really nice feature to use in any piece of code, from extracting a method to moving a class, changing parameters and functions, and many more.

Many more tricks can be found in this video, it is really long but worth every minute, https://youtu.be/eq3KiAH4IBI.
主站蜘蛛池模板: 左权县| 萨迦县| 凤翔县| 辉南县| 泽州县| 临夏市| 龙里县| 屯昌县| 鹤山市| 兴国县| 静乐县| 陆川县| 全椒县| 通化县| 江川县| 昆山市| 甘泉县| 淮滨县| 延寿县| 湘潭县| 揭西县| 平阴县| 大关县| 星座| 乌拉特前旗| 讷河市| 汶上县| 昌都县| 专栏| 依安县| 宜阳县| 泗水县| 益阳市| 庄浪县| 融水| 丰顺县| 盈江县| 芮城县| 哈密市| 建平县| 抚顺县|