Copy a couple of lines

2. Help
  • Hi I have a problem and want to know if there is a sollution for.

    I have a file with 5000 lines and I need to find some lines with a word in it. I know if I go to search he can find all the words that I am looking for and even bookmark them with a Yellow dot and highlight the word red.

    But how can I copy all the founded lines to a new notepad file???

    • pshute

      Use Plugins/Textviz/"Hide Lines Without Clipboard Text" to show only the matching lines. Then select them and use Plugins/Textviz/"Copy Visible Selection" to copy just those lines to the clipboard.  My tests found that you might get a few more lines than you want, but it's better than nothing.  You could also just use grep or findstr to filter them out.

    • Greg Bullock
      Greg Bullock

      Another option is to record a keystroke macro.  The combination

      <F3>, <End>, <Home>, <Home>, <Shift-End>, <Ctrl-C>, <Ctrl-Tab>, <Ctrl-V>, <Enter>, <Home>, and <Ctrl-Shift-Tab>

      should do it, provided that the next tab has the target file.  You can automatically repeat the macro playback until the end of file is reached.  If necessary, you may want to insert a <Down> keystroke after, say, the <Ctrl-C> to copy the line just one time per keyword instance.