Community
    • Login

    Any plugins to extract selected text into a new file (for refactoring)?

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 413 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pbarneyP
      pbarney
      last edited by

      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?

      Terry RT mkupperM 2 Replies Last reply Reply Quote 0
      • Terry RT
        Terry R @pbarney
        last edited by Terry R

        @pbarney

        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.

        1 Reply Last reply Reply Quote 3
        • mkupperM
          mkupper @pbarney
          last edited by

          @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.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors