Hi!
Lets say I have houndreds of images in a folder and I want to list them in an HTML-document. So I just paste in my list of images in TextMate like this:
IMGP0410.jpg IMGP0411.jpg IMGP0412.jpg IMGP0413.jpg IMGP0414.jpg
To make proper links of this list I will have to paste the complete list of images once more next to my first list like this:
IMGP0410.jpg IMGP0410.jpg IMGP0411.jpg IMGP0411.jpg IMGP0412.jpg IMGP0412.jpg IMGP0413.jpg IMGP0413.jpg IMGP0414.jpg IMGP0414.jpg
Is it possible to do this in textmate without having to manually edit every line in my list?
/regards David S, Sweden
supinum david@supinum.com wrote (Thu, 15 Jul 2010 02:50:48 -0700):
Lets say I have houndreds of images in a folder and I want to list them in an HTML-document. So I just paste in my list of images in TextMate like this:
IMGP0410.jpg IMGP0411.jpg IMGP0412.jpg IMGP0413.jpg IMGP0414.jpg
To make proper links of this list I will have to paste the complete list of images once more next to my first list like this:
IMGP0410.jpg IMGP0410.jpg IMGP0411.jpg IMGP0411.jpg IMGP0412.jpg IMGP0412.jpg IMGP0413.jpg IMGP0413.jpg IMGP0414.jpg IMGP0414.jpg Is it possible to do this in textmate without having to manually edit every line in my list?
1. Select the full list using "column mode", i.e. keep the option key and the mouse button pressed while you move the mouse. 2. Hit command + c to copy the selection to the clipboard. 3. Move the cursor to the end of the first line and hit the tab key or insert a few spaces. 4. Hit command + v to insert the clipboard's content - voilà! :-)
Kind regards, Tobias Jung
Tobias Jung-2 wrote:
supinum david@supinum.com wrote (Thu, 15 Jul 2010 02:50:48 -0700):
Lets say I have houndreds of images in a folder and I want to list them in an HTML-document. So I just paste in my list of images in TextMate like this:
IMGP0410.jpg IMGP0411.jpg IMGP0412.jpg IMGP0413.jpg IMGP0414.jpg
To make proper links of this list I will have to paste the complete list of images once more next to my first list like this:
IMGP0410.jpg IMGP0410.jpg IMGP0411.jpg IMGP0411.jpg IMGP0412.jpg IMGP0412.jpg IMGP0413.jpg IMGP0413.jpg IMGP0414.jpg IMGP0414.jpg Is it possible to do this in textmate without having to manually edit every line in my list?
- Select the full list using "column mode", i.e. keep the option key
and the mouse button pressed while you move the mouse. 2. Hit command + c to copy the selection to the clipboard. 3. Move the cursor to the end of the first line and hit the tab key or insert a few spaces. 4. Hit command + v to insert the clipboard's content - voilà! :-)
Kind regards, Tobias Jung
Beautiful! Thanx alot!
Still one question though. What if I have thousands of images... Will I under any circumstances have to scroll down to the bottom of my list to in order to select every single line?
/David
supinum david@supinum.com wrote (Thu, 15 Jul 2010 03:24:41 -0700):
Still one question though. What if I have thousands of images... Will I under any circumstances have to scroll down to the bottom of my list to in order to select every single line?
No, you can use command + a to select all, then hit the option key once. You'll see that the normal kind of selection switches to column mode -- at least, in theory. I don't know why but sometimes this doesn't work for me and I have to hit the option key a few times for the selection to change, or maybe de- select all and start again...
Kind regards, Tobias Jung
Hi
I'm not sure of the full context of your problem but you could also do a regex search and replace
search for this: ^(.+)$ (make sure to tick of regex) replace with this: $1\t$1
Then all your lines is duplicated separated by a tab.
/ Michael
On Thu, Jul 15, 2010 at 4:30 PM, Tobias Jung newsgr@tobiasjung.net wrote:
supinum david@supinum.com wrote (Thu, 15 Jul 2010 03:24:41 -0700):
Still one question though. What if I have thousands of images... Will I under any circumstances have to scroll down to the bottom of my
list
to in order to select every single line?
No, you can use command + a to select all, then hit the option key once. You'll see that the normal kind of selection switches to column mode -- at least, in theory. I don't know why but sometimes this doesn't work for me and I have to hit the option key a few times for the selection to change, or maybe de- select all and start again...
Kind regards, Tobias Jung
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Wow! this defenitly something to wet ones pants over. How does one get to understand these things. I know I love the idea but how am I ever going to get the grips! ahhh! Thanx!
/David
Michael Bøcker-Larsen wrote:
Hi
I'm not sure of the full context of your problem but you could also do a regex search and replace
search for this: ^(.+)$ (make sure to tick of regex) replace with this: $1\t$1
Then all your lines is duplicated separated by a tab.
/ Michael
On Thu, Jul 15, 2010 at 4:30 PM, Tobias Jung newsgr@tobiasjung.net wrote:
supinum david@supinum.com wrote (Thu, 15 Jul 2010 03:24:41 -0700):
Still one question though. What if I have thousands of images... Will I under any circumstances have to scroll down to the bottom of my
list
to in order to select every single line?
No, you can use command + a to select all, then hit the option key once. You'll see that the normal kind of selection switches to column mode -- at least, in theory. I don't know why but sometimes this doesn't work for me and I have to hit the option key a few times for the selection to change, or maybe de- select all and start again...
Kind regards, Tobias Jung
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
--
Michael Bøcker-Larsen
e: mblarsen@gmail.com m: +9779840050779 p: +--[ RSA 2048]----+ | | | . | | * | | B o | | . S * | | . o. o o | | = .E | | . +*+ | | oB* | +-----------------+
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Yes, master it and it will be your best friend along with TextMate of course :)
Here is a playground:
Here is some background:
http://www.regular-expressions.info/ http://en.wikipedia.org/wiki/Regular_expression
Enjoy, Michael
On Thu, Jul 15, 2010 at 4:57 PM, supinum david@supinum.com wrote:
Wow! this defenitly something to wet ones pants over. How does one get to understand these things. I know I love the idea but how am I ever going to get the grips! ahhh! Thanx!
/David
Michael Bøcker-Larsen wrote:
Hi
I'm not sure of the full context of your problem but you could also do a regex search and replace
search for this: ^(.+)$ (make sure to tick of regex) replace with this: $1\t$1
Then all your lines is duplicated separated by a tab.
/ Michael
On Thu, Jul 15, 2010 at 4:30 PM, Tobias Jung newsgr@tobiasjung.net wrote:
supinum david@supinum.com wrote (Thu, 15 Jul 2010 03:24:41 -0700):
Still one question though. What if I have thousands of images... Will I under any circumstances have to scroll down to the bottom of my
list
to in order to select every single line?
No, you can use command + a to select all, then hit the option key once. You'll see that the normal kind of selection switches to column mode -- at least, in theory. I don't know why but sometimes this doesn't work for me and I have to hit the option key a few times for the selection to change, or maybe de- select all and start again...
Kind regards, Tobias Jung
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
--
Michael Bøcker-Larsen
e: mblarsen@gmail.com m: +9779840050779 p: +--[ RSA 2048]----+ | | | . | | * | | B o | | . S * | | . o. o o | | = .E | | . +*+ | | oB* | +-----------------+
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- View this message in context: http://old.nabble.com/duplicating-a-column-in-TextMate-tp29171078p29171660.h... Sent from the textmate users mailing list archive at Nabble.com.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Michael Bøcker-Larsen wrote:
Yes, master it and it will be your best friend along with TextMate of course :)
Here is a playground:
Here is some background:
http://www.regular-expressions.info/ http://en.wikipedia.org/wiki/Regular_expression
Enjoy, Michael
Thanx again! I'll defenitely enjoy this one!