{"id":808,"date":"2021-10-28T07:23:38","date_gmt":"2021-10-28T07:23:38","guid":{"rendered":"https:\/\/oslyk.com\/?p=808"},"modified":"2022-10-29T19:57:12","modified_gmt":"2022-10-29T19:57:12","slug":"intellij-idea-hotkeys-and-tips-every-developer-should-know","status":"publish","type":"post","link":"https:\/\/oslyk.com\/index.php\/2021\/10\/28\/intellij-idea-hotkeys-and-tips-every-developer-should-know\/","title":{"rendered":"IntelliJ IDEA hotkeys and tips every developer should know"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>I would like to present you some smart shortcuts, thanks to which if you spend a lot of time programming, you will be able to save up to 1 hour of time per week. I would like to point out right away that I will not list all the existing IntelliJ hotkeys here, because it would be a bit pointless (after all, you can check the official documentation or check the current configuration of the tool).<\/p>\n\n\n\n<p>In the following article I will share with you the tricks that I use the most during my work myself. As time passes, I will try to update this post (if I find something new and worth your attention &#8211; I will definitely share with you).<\/p>\n\n\n\n<p>Before we go to the main content of the article, I would like to draw your attention to a very useful plugin that you can install in IntelliJ. I mean the <strong>Key Promoter X<\/strong> exactly which helps you to learn essential shortcuts while you are working. When you use the mouse on a button inside the IDE, the Key Promoter X shows you the keyboard shortcut that you should have used instead. For me it was a really good way to start learning keyboard shortcuts.<\/p>\n\n\n\n<p>That would be enough for the introduction. Now it&#8217;s time for the main part!<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h2 class=\"wp-block-heading\"><br>View management<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\">Show\/Hide project files [<strong>ALT + 1<\/strong>]<\/h5>\n\n\n\n<p>tutaj opis<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><br>Complete current statement [CTRL + SHIFT + ENTER]<\/h5>\n\n\n\n<p>Insert any necessary trailing symbols and put the caret where you can start typing the next statement.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Invoke refactoring [CTRL + ALT + SHIFT + T]<\/h5>\n\n\n\n<p>Refactor the element under the caret, for example, safe delete, copy, move, rename, and so on.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Change the Intellij project window [ALT + `]<\/h5>\n\n\n\n<p>The shortcut is useful when we work on more than one project at the same time<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Quick documentation [CTRL + Q]<\/h5>\n\n\n\n<p>If you want more information about a symbol at caret, for example, where it comes from or what its type is, the Quick Documentation is your friend. Press Ctrl+Q to invoke it and you will see a popup with these details. If you don\u2019t need the full info, then use the Type Info action instead: it only shows the type of the selected expression, but doesn&#8217;t take up that much of screen space.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><br>Navigation<\/h3>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\">Search everywhere [Double SHIFT]<\/h5>\n\n\n\n<p>Displays a window to search for files<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Go to file [CTRL + SHIFT + N]<\/h5>\n\n\n\n<p>go to file<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><br>Go to class [CTRL + N]<\/h5>\n\n\n\n<p>go to class<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Go to symbol [CTRL + ALT + SHIFT + N]<\/h5>\n\n\n\n<p>go to symbol<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Go to declaration [CTRL + B]<\/h5>\n\n\n\n<p>go to declaration<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Recent files and locations [CTRL + E]<\/h5>\n\n\n\n<p>Normally, you work with a small subset of files at a time and need to switch between them quickly. The Recent Files action is a real time-saver here. Press Ctrl+E to see a list of last accessed files. Note that you can also use this action to open any tool window.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Quick access to recent locations [CTRL + SHIFT + E]<\/h5>\n\n\n\n<p>Apart from jumping to a recent file, you can also get quick access to Recent Locations &#8211; that is code snippets you last viewed or edited. Press Ctrl+Shift+E and you&#8217;ll be able to jump to a particular line you modified lately.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h2 class=\"wp-block-heading\"><br>Refactoring<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">Refactor [CTRL + ALT + SHIFT + T]<\/h5>\n\n\n\n<p>Refactor this<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Rename [SHIFT + F6]<\/h5>\n\n\n\n<p>Rename file or method <\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Extract variable [CTRL + ALT + V]<\/h5>\n\n\n\n<p>info about extracting variable<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Extract field [CTRL + ALT + F]<\/h5>\n\n\n\n<p>method for extracting field<\/p>\n\n\n\n<p><\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Extract constant [CTRL + ALT + C]<\/h5>\n\n\n\n<p>opis extract<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Extract method [CTRL + ALT + M]<\/h5>\n\n\n\n<p>opis exract method<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Extract parameter [CTRL + ALT + P]<\/h5>\n\n\n\n<p>method for extracting params<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Inline [CTRL + ALT + N]<\/h5>\n\n\n\n<p>inline code<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><br>Move to the source of code [F4]<\/h5>\n\n\n\n<p>Jump to the source of a given method, variable, etc. &#8211; place the caret and click F4<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h2 class=\"wp-block-heading\"><br>DEBUGGING<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\">Set line breakpoints [CTRL + F8]<\/h5>\n\n\n\n<p>Set line breakpoints, method breakpoints, field watchpoints<br>line breakpoints &#8211; k\u00f3\u0142ko<br>method breakpoints &#8211; romb<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Breakpoint configuration panel [CTRL + SHIFT + F8]<\/h5>\n\n\n\n<p>it shows main breakpoint panel<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Debug tool window [ALT + 5]<\/h5>\n\n\n\n<p>show debug tool window<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<h5 class=\"wp-block-heading\"><br>Evaluate selected code elements [CTRL + ALT + F8]<\/h5>\n\n\n\n<p>During debugging (when the debugger stops on the selected endpoint), you can hover over any code fragment to see the current value (e.g. on any variable) &#8211; after a while a balloon with the information will appear. If there are more complex fragments (greater than one variable, e.g. some calculations or functions), you can select a code fragment, and then Ctrl + Alt + F8<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><br>Evaluation [ALT + F8]<\/h5>\n\n\n\n<p>Estimating any expressions is possible after selecting a fragment (when stopped by a breakpoint) and selecting the Alt + F8 shortcut<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I would like to present you some smart shortcuts, thanks to which if you spend a lot of time programming, you will be able to save up to 1 hour of time per week. I would like to point out right away that I will not list all the existing IntelliJ hotkeys here, because it&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"_links":{"self":[{"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/posts\/808"}],"collection":[{"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/comments?post=808"}],"version-history":[{"count":26,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/posts\/808\/revisions"}],"predecessor-version":[{"id":913,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/posts\/808\/revisions\/913"}],"wp:attachment":[{"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/media?parent=808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/categories?post=808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oslyk.com\/index.php\/wp-json\/wp\/v2\/tags?post=808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}