Any plugins to extract selected text into a new file (for refactoring)?
-
I’m refactoring a large codebase and it would be helpful to be able to select a section of text, and then with a keypress, cut the text out, open a new file and paste the text into it.
Does such a thing exist?
-
Well the obvious comes to mind first. Just create a macro of the key presses to cut, open a new file and paste.
It does sound like you might have more to the story though so you would need to elaborate if this doesn’t solve your need.
Terry
PS I should add, that once the macro is created you can assign a shortcut key to activate it.
-
@pbarney, if the intent is refactoring then I don’t think you want to cut snippets out to put them in separate files as you are then creating a large problem of how to safely merge the refactored code back into the original source files.
Thus, it’s usually better to to refactor in place.
For large refactor projects I tend to use scripting languages to process the files rather than Notepad++. The choice of scripting languages does not matter as long as they are ones you are comfortable with.