Formating and cleaningįormatting and cleaning. Instead of creating manually test classes you can use the shortcut Ctrl+Shift+T. Instead of using search-replace – focus cursor on variable/constant/class/method and press Shift+F6. If you need to edit multiple lines use Ctrl+Ctrl(hold)+Arrow. Why write them multiple times? Write the code once and use Ctrl+d to duplicate it. Sometimes you need to write multiple similar lines and pass different parameters. Just use Ctrl+W to expand the selection, or Ctrl+Shift+W to narrow. Magic selectionĭid you know that you don’t need to manually select the strings, or some grouped parts of the code by a mouse, or arrows? There is a quite simple shortcut to select string, method name, field name or any other part of the code. Similary you can do this for focused value to extract it to variable using Ctrl+Alt+V, or to constant using Ctrl+Alt+C. To extract some part of the code to method – use Ctrl+Alt+M. Code generationĭo you want to get rid of manual implementation of constructors, getters, setters, toString, equals and hashCode? You can use automatic generation of the code – Alt+Insert. Intellij IDEA keyboard shortcuts: table of contentsĭo you have some red (or yellow) underlined parts in the code? Focus cursor on one of them and press Alt+Enter and see IDE’s suggestions how to fix the issue. In the future, I will provide you some keyboard shortcuts to navigate through projects. It led me to the idea of writing a series of blog posts about some interesting functionalities/plugins that Intellij Idea provides. Become the Chopin of your keyboard.ĭuring pair coding with my fellow Java developers, I’ve noticed that some of them are not familiar with some useful features of IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |