Alan,
Thank you so much for your speedy response. The images are in different places I'll try the second option as you suggest. I don't understand the specific meanings of (.*?) $1 and [^":]+):? with ?$1/? Is there a reference/source where I can learn more about searches and what those expressions mean?
Best regards,
James
On Friday, October 06, 2006, at 10:15AM, Allan Odgaard <throw-away-1(a)macromates.com> wrote:
>On 6. Oct 2006, at 18:43, <thelittleredhen(a)mac.com> wrote:
>
>> I have an xml file that contains numerous image paths in this
>> format <Pic_path href="HD2:Working Files:images:testpic.jpg"/>
>>
>> I need to convert them to this format <Pic_path href="file:///
>> Volumes/HD2/Working Files/images/testpic.jpg"/>
>>
>> Is there any way I can get TM to search for the paths and convert
>> the text?
>
>If all the images are in the same location, you can enable Regular
>Expressions, then search for: ?<Pic_path href="HD2:Working
>Files:images:(.*?)"/>? and replace with: ?<Pic_path href="file:///
>Volumes/HD2/Working Files/images/$1"/>?.
>
>If however they vary in path, you will need to first do a replace
>from: ?<Pic_path href="HD2:? to ?<Pic_path href="file:///Volumes/HD2/?.
>
>Then repeat a (regular expression) replace of: ?(<Pic_path
>href="file:///Volumes/HD2/[^":]+):? with ?$1/? until no replacements
>are done.
>
>Do a backup first!
>
>
>______________________________________________________________________
>For new threads USE THIS: textmate(a)lists.macromates.com
>(threading gets destroyed and the universe will collapse if you don't)
>http://lists.macromates.com/mailman/listinfo/textmate
>
>
Alan,
Thank you so much for your speedy response. The images are in different places I'll try the second option as you suggest. I don't understand the specific meanings of (.*?) $1 and [^":]+):? with ?$1/? Is there a reference/source where I can learn more about searches and what those expressions mean?
Best regards,
James
On Friday, October 06, 2006, at 10:15AM, Allan Odgaard <throw-away-1(a)macromates.com> wrote:
>On 6. Oct 2006, at 18:43, <thelittleredhen(a)mac.com> wrote:
>
>> I have an xml file that contains numerous image paths in this
>> format <Pic_path href="HD2:Working Files:images:testpic.jpg"/>
>>
>> I need to convert them to this format <Pic_path href="file:///
>> Volumes/HD2/Working Files/images/testpic.jpg"/>
>>
>> Is there any way I can get TM to search for the paths and convert
>> the text?
>
>If all the images are in the same location, you can enable Regular
>Expressions, then search for: ?<Pic_path href="HD2:Working
>Files:images:(.*?)"/>? and replace with: ?<Pic_path href="file:///
>Volumes/HD2/Working Files/images/$1"/>?.
>
>If however they vary in path, you will need to first do a replace
>from: ?<Pic_path href="HD2:? to ?<Pic_path href="file:///Volumes/HD2/?.
>
>Then repeat a (regular expression) replace of: ?(<Pic_path
>href="file:///Volumes/HD2/[^":]+):? with ?$1/? until no replacements
>are done.
>
>Do a backup first!
>
>
>______________________________________________________________________
>For new threads USE THIS: textmate(a)lists.macromates.com
>(threading gets destroyed and the universe will collapse if you don't)
>http://lists.macromates.com/mailman/listinfo/textmate
>
>
Hi,
I¹m completely new to TM, not a programmer and totally out of my depth on
this but here goes!
I have an xml file that contains numerous image paths in this format
<Pic_path href="HD2:Working Files:images:testpic.jpg"/>
I need to convert them to this format <Pic_path
href="file:///Volumes/HD2/Working Files/images/testpic.jpg"/>
Is there any way I can get TM to search for the paths and convert the text?
Any help would be really appreciated!
Thanks
James
Hi!
I just wanted to ask how to use the new "`"' ?
When I type " it autocompletes to "" setting the cursor between the
two "
When I type now ` the whole thing becomes "`'" and not "`"'
Niels
--
Don't say me the data while speaking on phone, that's too unsecure.
Please send them by e-mail
-- Customer of a German webhoster
How different is the Cutting Edge version from the Minor Updates version?
Is it stable enough to use day-to-day? Is there a place on Macromates (some
skimming about didn't turn one up) where I could read the release notes, or
do I have to track it by some other means?
--
Chris R.
======
Not to be taken literally, internally, or seriously.
Hi,
I'd like to know if it's possible to select wich Python version
Textmate uses.
Actually my default system version is 2.4.3. BBEdit runs with
previous 2.3.5 but Textmate takes the 2.4.3
Revert 2.3.5 to the default Python would be a great idea too, but I
couldn't find out how to do it.
Thanks for your help,
Joancarles
newbie,yes
·················
www.casasin.com
·················
Hi there,
I was wondering whether it was possible for a textmate bundle to
launch an external process, and then when triggered, could send some
text to the process (for example, using standard streams) and then do
something with the information that the process spits out.
Now I know you can do this whole workflow for each command, i.e. you
could read the current line, pass it as parameters to a command, and
then replace the line with the output of the program.
What I want to do is to have the process persist over command
triggers. i.e. One trigger might start the process, another might feed
it information and do something with the response (this command may be
called multiple times, and each time it would communicate with the
same process, rather than create a new process), and a final trigger
might end the process.
Is this at all possible?
Thanks,
Sam Aaron
--
http://sam.aaron.name
Hi, simple question I think, but I can't find the answer
I quasi-always use regular expressions in the find and replace box, but this
button defaults to plain text search.
Q: What is the pref called to set this button's default to ticked?
Executing "defaults read com.macromates.textmate"
The closest I can see is this
OakFindPanelOptions = {
action = replaceAll;
findInProjectIgnoreCase = 0;
findString = "duchaine";
ignoreCase = 1;
replaceAllScope = document;
replaceString = " $1";
wrapAround = 0;
};
But no sign of "Regular Expression"
Tim
Hi Allan,
Here are some tests and what I get in the log(I removed "date +
TextMate[pid]" on every lines):
OS X 10.4.8, TextMate1269
Tried in my account and in a fresh one. Same results.
If I press ^⎋: Nothing
If I press ⌘⎋:
performKeyEquivalent: system gave us: ⎋
performKeyEquivalent: user actually pressed: ⌘⎋
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
If I press alt+esc: Beep. Nothing.
If I press ⌃⌘⎋
performKeyEquivalent: system gave us: ⎋
performKeyEquivalent: user actually pressed: ⌃⌘⎋
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
If I press ⌃⌥⎋
performKeyEquivalent: system gave us: ⎋
performKeyEquivalent: user actually pressed: ⌃⌥⎋
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
Any ^ + whatever or ^ + ⇧ + whatever: Nothing
Any ⌘ + whatever or ⌘ + ⇧ + whatever: Looks fine, e.g.:
performKeyEquivalent: system gave us: ⇧⌘L
performKeyEquivalent: user actually pressed: ⇧⌘L
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
Any ^ + ⌘ + whatever: Looks fine, e.g.:
performKeyEquivalent: system gave us: ⌃⌘M
performKeyEquivalent: user actually pressed: ⌃⌘M
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
Any ⌥ + ⌘ + whatever(not those used by the system.): Looks fine, e.g.:
performKeyEquivalent: system gave us: ⌥⌘S
performKeyEquivalent: user actually pressed: ⌥⌘S
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
Tell me if I can try something more...
--
FredB
from my log file, hope this helps:
performKeyEquivalent: system gave us: ⌃⌥⌘B
performKeyEquivalent: user actually pressed: ⌃⌥⌘B
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
performKeyEquivalent: system gave us: ⌘W
performKeyEquivalent: user actually pressed: ⌘W
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
performKeyEquivalent: system gave us: ⌥⌘T
performKeyEquivalent: user actually pressed: ⌥⌘T
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO
performKeyEquivalent: system gave us: ↓
performKeyEquivalent: user actually pressed: ↓
performKeyEquivalent: match against: ⌃⎋
performKeyEquivalent: did match: NO