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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login