![]() ![]() The full Emmet cheat sheet for CSS and HTML can be found here. You can choose where to position your cursor, add variables, and much more. Typing div#myDiv>span.mySpanClass>ul>li*5 and hitting tab will turn into:įurther extend this in any language of your choice by adding your own expandable templates into the Settings -> Editor -> Live Templates dialog. Generate full HTML without writing it out, using Emmet, built into PhpStorm. Forgot how the code reformat shortcut goes? Just CTRL+SHIFT+A and type “refor.”: CTRL+SHIFT+A will spawn a command search popup. If you’re in love with Sublime’s ability to search for commands of the IDE itself, you can do that too. PhpStorm remembers multiple clipboard contents – you can press CTRL+SHIFT+V to summon a popup which lets you paste clipboard content that’s less recent than the latest. The search is fuzzy, and also supports line numbers – you can use abbreviations followed by :XX where XX is the line number: This can range from turning off error reports for suppressed notices (something I recommend against), to merging CSS rules:ĬTRL+N and CTRL+SHIFT+N will let you instantly move to any part of any class or file in your entire project: Clicking this light bulb or pressing ALT+Enter will suggest solutions – in any language. When PhpStorm detects some problems, it will underline the problematic area and summon a lightblub on top of it when you hover your mouse or keyboard cursor in that area. Holding down CTRL when hovering over variables or methods will give you their full names or locations of declaration, while CTRL+Clicking on a variable or method, or pressing CTRL+B when on a method’s call or on a variable will take you directly to where it’s defined:ĬTRL+Space will summon a code hinting dialog, if you accidentally closed it or for some reason it didn’t open: ![]() This is very useful when dealing with large files and having to reference another part only to come back to the original to continue the work: Pressing CTRL+SHIFT+Backspace, or the “Forward” and “Back” buttons on your mouse if you have them, will walk you through your previous edit locations. If you’re on Linux, your CTRL+ALT+L shortcut might already be bound to “Lock Screen”, and you’ll need to unbind it from the system, or change it in PhpStorm’s settings. Note, however, that if you’re working on a project with someone else, this might cause refactors in various files far too often, and pollute your version control system with changes that aren’t changes at all. If you use this excessively and don’t often work on other people’s projects, you take it up another notch – bind a macro to the CTRL+S shortcut, and make PhpStorm automatically reformat your code on every manual save. ![]() What’s more, as you can see by the popup that appears in the animation above, you can choose to reformat your entire project. Let’s see some shortcuts and hacks we can take advantage of:ĬTRL + ALT + L, one of my most used keyboard combos, will immediately format your code according to the preferred style guidelines: PhpStorm’s high configurability (it’s almost an “Android” of the PHP IDE world) lets you fine tune it to infinity – you can make it into a tool so personal, it might seem like a different IDE to anyone opening your settings. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |