Search code examples
idemacroseditorphpstormhotkeys

Storing a code block in PHP Storm to paste later


I'm wondering if there is a way to store common blocks of code in PHP Storm so you can easily paste them later. I don't particularly want to use the extended Clipboard as that eventually goes away.

It would be great if I could store it and set a hot key so I can easily paste it.

Is this possible?


Solution

  • You have multiple options which you can mix and match. In descending order of usefulness (IMHO):

    • Live Templates are perhaps the most flexible, allowing operations on cursor, selection and more
    • Tools - Save file as template
    • Scratch files
    • Version control shelf (window Version Control, tab Local Changes, right click modified file, click Shelve)