Cut/Copy Append...
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Cut/Copy Append...
This may be a feature request, unless someone has the quick answer
I often find I need to Cut/Copy several 'bits' of text... say names in an HTML <select/> <option/>'s list, or variables, or 'rows' of data.... to paste elsewhere. I could cut/copy each bit, and paste immediately, but this is often a pain, if in another document, or say 2,000 lines above/below in the same document.
What I would really like, is the ability to Cut/Copy Append... BUT, Append a new line/carriage return character after (or before) each entry...
Without the line, it can be quite tricky to separate the values after...
Is there a way of doing this in TextPad?
I tried setting up a tool, that past in the "selected text" to a DOS batch file, which wrote (appended) the snip to a scratch file, with a line feed... but DOS doesn't always like the spaces in the text I copy, and when I'm done, I have to open the other file, to copy it, and paste it back where I need it.
Anyone have any slick ideas on how to handle this?
Cheers,
Bonzo
I often find I need to Cut/Copy several 'bits' of text... say names in an HTML <select/> <option/>'s list, or variables, or 'rows' of data.... to paste elsewhere. I could cut/copy each bit, and paste immediately, but this is often a pain, if in another document, or say 2,000 lines above/below in the same document.
What I would really like, is the ability to Cut/Copy Append... BUT, Append a new line/carriage return character after (or before) each entry...
Without the line, it can be quite tricky to separate the values after...
Is there a way of doing this in TextPad?
I tried setting up a tool, that past in the "selected text" to a DOS batch file, which wrote (appended) the snip to a scratch file, with a line feed... but DOS doesn't always like the spaces in the text I copy, and when I'm done, I have to open the other file, to copy it, and paste it back where I need it.
Anyone have any slick ideas on how to handle this?
Cheers,
Bonzo
Okay, maybe I need to explain better...
Lets say I have:
(add another 20+ values... I've truncated the sample list)
So, what I want, is to copy all the internal values out, with a line feed, so that I have:
I could, as you suggested, copy one item, then copy a line feed from somewhere else, then the next, then a line feed, then... but now this doubles the number of things I need to select, and copy... and selecting a line feed isn't the easiest thing to do...
As mentioned, I have a DOS batch file that is currently helping me, but this seems like such an easy thing...
If there isn't a way to do it currently, then I think I'll mention this to Helios as a Feature Request, to either toggle adding a line break, or have a duplicate command, with the line break option.
Cheers,
Bonzo
Lets say I have:
Code: Select all
<select name="foo" size="8">
<option value="1">Red Stuff</option>
<option value="2">Orange Stuff</option>
<option value="3">Yellow Stuff</option>
<option value="4">Green Stuff</option>
<option value="5">Blue Stuff</option>
<option value="6">Indigo Stuff</option>
<option value="7">Violet Stuff</option>
</select>
So, what I want, is to copy all the internal values out, with a line feed, so that I have:
Code: Select all
Red Stuff
Orange Stuff
Yellow Stuff
Green Stuff
Blue Stuff
Indigo Stuff
Violet Stuff
...
As mentioned, I have a DOS batch file that is currently helping me, but this seems like such an easy thing...
If there isn't a way to do it currently, then I think I'll mention this to Helios as a Feature Request, to either toggle adding a line break, or have a duplicate command, with the line break option.
Cheers,
Bonzo
I guess I'm not being clear enough....
What I need, is a "copy append" command, that either by configuration, or by a macro, or by whatever.... adds a line break after each 'clip' is added.
My example was too easy... I will be copying several bits, of random data, from random locations... block select won't help me here...
Is there a way I can get the current clipboard selection? as a variable say?....
so that within a macro, I can grab whats already there, add a line break, then whatever text I have selected on screen?....
cheers,
What I need, is a "copy append" command, that either by configuration, or by a macro, or by whatever.... adds a line break after each 'clip' is added.
My example was too easy... I will be copying several bits, of random data, from random locations... block select won't help me here...
Is there a way I can get the current clipboard selection? as a variable say?....
so that within a macro, I can grab whats already there, add a line break, then whatever text I have selected on screen?....
cheers,
For me, the quickest way would be to select the lines that contain what you want, paste them into a new document, then use the replace command to get rid of any excess characters.
For example, get rid of the trailing stuff by searching for the regular expression "<.+" and replacing with nothing. Leading stuff can be stripped by replacing ".+>" with nothing. Or, doing it all at once (using POSIX syntax):
You could record that as a macro, if you do it a lot.
Keith MacDonald
Helios Software Solutions
For example, get rid of the trailing stuff by searching for the regular expression "<.+" and replacing with nothing. Leading stuff can be stripped by replacing ".+>" with nothing. Or, doing it all at once (using POSIX syntax):
Code: Select all
Find what: ^[^>]+>([^<]+).*
Replace with: \1
Keith MacDonald
Helios Software Solutions