working with clips

Quick question -- when working on code projects, sometimes I have a need to remove a large chunk of code and temporarily put it somewhere else. Usually this is in the course of migrating a class or refactoring. I know I can comment out but on huge (100 lines) it doesn't work so well, especially if the file is a mix of PHP and HTML. It's easier just to cut it out for a moment.

On other editors, I would just do File/New and create a temp blank file (usually not saving, since this is a temporary thing) and paste in my code to get it out of the way. In a few minutes, I'd paste it back and close close the temporarily file without saving. In PHPStorm, I can't just "create a blank file", I'm walked through the process of naming it, adding to the project, etc. I wind up keeping BBEdit open just for this purpose which seems like a waste.

Is there any way to just get a clip out of the way like this within the PHPStorm environment?

3 comments
Comment actions Permalink

Hi Kris,

There is no built-in functionality like that and no plans of implementing it (although there is a request for it).

Please try this plugin: http://plugins.intellij.net/plugin?pr=webide&pluginId=4428

0
Comment actions Permalink

Actually that works great for me, thanks. It was a bit confusing at first because on I'm on Mac and the keystroke is Option+C not Command+C -- generally the Alt key on Windows keyboards maps to Command on a Mac, but got it working.

0
Comment actions Permalink

Hello,

is this really needed? First of all, phpstorm has a clipboard history (shift-cmd/ctrl-v) where you can select one of the last clipboard contents. If anything goes wrong with the clipboard, there is still the local history. It is possible to copy code from the compare window.

In the times before phpstorm i worked the same way - i had several tempfiles with codeversions and fragments. But i don't need this anymore (and i'm happy about it).

Cheers,

Thomas

0

Please sign in to leave a comment.